momepy.PerimeterWall#

class momepy.PerimeterWall(gdf, spatial_weights=None, verbose=True)[source]#

Calculate the perimeter wall length of the joined structure.

Parameters:
gdfGeoDataFrame

A GeoDataFrame containing objects to analyse.

spatial_weightslibpysal.weights, optional

A spatial weights matrix. If None, Queen contiguity matrix will be calculated based on gdf. It is to denote adjacent buildings.

verbosebool (default True)

If True, shows progress bars in loops and indication of steps.

Notes

The spatial_weights keyword argument should be based on position, not unique ID.

It might take a while to compute this character.

Examples

>>> buildings_df['wall_length'] = mm.PerimeterWall(buildings_df).series
Calculating spatial weights...
Spatial weights ready...
100%|██████████| 144/144 [00:00<00:00, 4171.39it/s]
Attributes:
seriesSeries

A Series containing resulting values.

gdfGeoDataFrame

The original GeoDataFrame.

swlibpysal.weights

The spatial weights matrix.

__init__(gdf, spatial_weights=None, verbose=True)[source]#

Methods

__init__(gdf[, spatial_weights, verbose])