momepy.
CompactnessWeightedAxis
Calculates compactness-weighted axis of each object in given GeoDataFrame.
Initially designed for blocks.
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
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.
the name of the dataframe column, np.array, or pd.Series where is stored longest axis length value. If set to None, function will calculate it during the process without saving them separately.
Examples
>>> blocks_df['cwa'] = mm.CompactnessWeightedAxis(blocks_df).series
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, perimeters, longest_axis])
Initialize self.