momepy.
Rectangularity
Calculates rectangularity of each object in given GeoDataFrame.
Adapted from [DPR+17].
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.
np.array
pd.Series
None
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__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(gdf[, areas])
Initialize self.