momepy.
Convexity
Calculates Convexity 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['convexity'] = momepy.Convexity(buildings_df).series >>> buildings_df['convexity'][0] 0.8151964258521672
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.