momepy.SharedWalls#

class momepy.SharedWalls(gdf)[source]#

Calculate the length of shared walls of adjacent elements (typically buildings).

\[\textit{length of shared walls}\]

Note that data needs to be topologically correct. Overlapping polygons will lead to incorrect results.

Adapted from [Hamaina et al., 2012].

Parameters:
gdfGeoDataFrame

A GeoDataFrame containing objects to analyse.

See also

SharedWallsRatio

Examples

>>> buildings_df['swr'] = momepy.SharedWalls(buildings_df).series
Attributes:
seriesSeries

A Series containing resulting values.

gdfGeoDataFrame

The original GeoDataFrame.

__init__(gdf)[source]#

Methods

__init__(gdf)