momepy.
ShapeIndex
Calculates shape index of each object in given GeoDataFrame.
GeoDataFrame containing objects
the name of the dataframe column, np.array, or pd.Series where is stored longest axis value
np.array
pd.Series
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.
None
Examples
>>> buildings_df['shape_index'] = momepy.ShapeIndex(buildings_df, longest_axis='long_ax', areas='area').series 100%|██████████| 144/144 [00:00<00:00, 5558.33it/s] >>> buildings_df['shape_index'][0] 0.7564029493781987
Series containing resulting values
original GeoDataFrame
Series containing used longest axis values
Series containing used area values
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(gdf, longest_axis[, areas])
Initialize self.