momepy.Elongation¶
-
class
momepy.
Elongation
(gdf)[source]¶ Calculates elongation of 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 [GMBeiraoD12].
- Parameters
- gdfGeoDataFrame
GeoDataFrame containing objects
Examples
>>> buildings_df['elongation'] = momepy.Elongation(buildings_df).series >>> buildings_df['elongation'][0] 0.9082437463675544
- Attributes
- eSeries
Series containing resulting values
- gdfGeoDataFrame
original GeoDataFrame
Methods
__init__
(gdf)Initialize self.