momepy.
SquareCompactness
(gdf, areas=None, perimeters=None)[source]¶Calculates compactness index of each object in given geoDataFrame.
GeoDataFrame containing objects
the name of the dataframe column, np.array, or pd.Series where is stored area value. If set to None, function will calculate areas during the process without saving them separately.
the name of the dataframe column, np.array, or pd.Series where is stored perimeter value. If set to None, function will calculate perimeters during the process without saving them separately.
References
Feliciotti A (2018) RESILIENCE AND URBAN DESIGN:A SYSTEMS APPROACH TO THE STUDY OF RESILIENCE IN URBAN FORM. LEARNING FROM THE CASE OF GORBALS. Glasgow.
Examples
>>> buildings_df['squ_comp'] = momepy.SquareCompactness(buildings_df).series
>>> buildings_df['squ_comp'][0]
0.6193872538650996
Series containing resulting values
original GeoDataFrame
Series containing used area values
Series containing used perimeter values
__init__
(self, gdf, areas=None, perimeters=None)[source]¶Initialize self. See help(type(self)) for accurate signature.
Methods
|
Initialize self. |