momepy.longest_axis_length#

momepy.longest_axis_length(geometry)[source]#

Calculates the length of the longest axis of object.

Axis is defined as a diameter of minimal bounding circle around the geometry. It does not have to be fully inside an object.

\[\max \left\{d_{1}, d_{2}, \ldots, d_{n}\right\}\]
Parameters:
geometryGeoDataFrame | GeoSeries

A GeoDataFrame or GeoSeries containing polygons to analyse.

Returns:
Series

Examples

>>> path = momepy.datasets.get_path("bubenec")
>>> buildings = geopandas.read_file(path, layer="buildings")
>>> momepy.longest_axis_length(buildings)
0       40.265562
1      191.254382
2       37.247151
3       47.022428
4       37.170142
        ...
139     11.587272
140     27.747002
141     52.566435
142     11.091309
143     15.472821
Name: geometry, Length: 144, dtype: float64