momepy.
Rectangularity
(gdf, areas=None)[source]¶Calculates rectangularity 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.
References
Dibble, J. (2016) Urban Morphometrics: Towards a Quantitative Science of Urban Form. University of Strathclyde.
Examples
>>> buildings_df['rectangularity'] = momepy.Rectangularity(buildings_df, 'area').series
100%|██████████| 144/144 [00:00<00:00, 866.62it/s]
>>> buildings_df.rectangularity[0]
0.6942676157646379
Series containing resulting values
original GeoDataFrame
Series containing used area values
__init__
(self, gdf, areas=None)[source]¶Initialize self. See help(type(self)) for accurate signature.
Methods
|
Initialize self. |