momepy.proximity_bands

momepy.proximity_bands(geometry, band=20, shrink=0.001, segment=2, single_sided=False)[source]

Generate proximity bands around street segments.

Proximity bands partition space within a fixed distance from input street geometry using Voronoi tessellation. They can be used as analytical elements representing the area that can be observed by pedestrians, following Araldi and Fusco [2019].

By default, the function returns one band for each input geometry, clipped to a buffer of band distance around the input. When single_sided=True, the bands are split by the input geometry and each side of a line is returned separately. Single-sided proximity bands require the optional neatnet dependency.

Parameters:
geometry : GeoSeries | GeoDataFrame

A GeoDataFrame or GeoSeries containing linear geometry around which the proximity bands are generated.

band : float | int, optional

Distance defining the outer limit of proximity bands around the input geometry. By default 20

shrink : float, optional

The distance represents the fraction of the length of each LineString clipped on each end to avoid co-located points. By default 1e-3

segment : float, optional

The maximum distance between points after discretization. A right value is a sweet spot between computational inefficiency (when the value is too low) and suboptimal resulting geometry (when the value is too large). By default 2

single_sided : bool, optional

If True, split bands by input geometry and return separate bands for each side of each line. Requires neatnet. By default False

Returns:

GeoDataFrame containing proximity bands.

Return type:

GeoDataFrame

Examples

>>> path = momepy.datasets.get_path("bubenec")
>>> streets = geopandas.read_file(path, layer="streets")

Generate proximity bands:

>>> momepy.proximity_bands(streets, band=20).head()
                                        geometry
0  POLYGON ((1603419.57 6464266.746, 1603562.598 ...
1  POLYGON ((1603268.523 6464060.801, 1603282.94 ...
2  POLYGON ((1603413.18 6464228.695, 1603413.178 ...
3  POLYGON ((1603640.25 6464408.422, 1603640.262 ...
4  POLYGON ((1603542.571 6464488.589, 1603539.027...