Calculate shared walls ratio of adjacent elements (typically buildings)
Note that data needs to be topologically correct. Overlapping polygons will lead to
Adapted from [HLM12].
GeoDataFrame containing gdf to analyse
the name of the dataframe column, np.array, or pd.Series with unique id
the name of the dataframe column, np.array, or pd.Series where is stored perimeter value
>>> buildings_df['swr'] = momepy.SharedWallsRatio(buildings_df, 'uID').series
100%|██████████| 144/144 [00:00<00:00, 648.72it/s]
Series containing resulting values
Series containing used unique ID
Series containing used perimeters values
spatial index of gdf
Initialize self. See help(type(self)) for accurate signature.
__init__(self, gdf, unique_id[, perimeters])