momepy.
CircularCompactness
Calculates compactness index 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['circ_comp'] = momepy.CircularCompactness(buildings_df, 'area').series >>> buildings_df['circ_comp'][0] 0.572145421828038
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.