momepy.Elongation#
- class momepy.Elongation(gdf)[source]#
Calculates the elongation of each object seen as elongation of its minimum bounding rectangle.
\[{{p - \sqrt{p^2 - 16a}} \over {4}} \over {{{p} \over {2}} - {{p - \sqrt{p^2 - 16a}} \over {4}}}\]where a is the area of the object and p its perimeter.
Based on [Gil et al., 2012].
- Parameters:
- gdfGeoDataFrame
A GeoDataFrame containing objects.
Examples
>>> buildings_df['elongation'] = momepy.Elongation(buildings_df).series >>> buildings_df['elongation'][0] 0.9082437463675544
- Attributes:
- eSeries
A Series containing resulting values.
- gdfGeoDataFrame
The original GeoDataFrame.
Methods
__init__
(gdf)