momepy.StreetProfile#
- class momepy.StreetProfile(left, right, heights=None, distance=10, tick_length=50, verbose=True)[source]#
Calculates the street profile characters.
Returns a dictionary with widths, standard deviation of width, openness, heights, standard deviation of height and ratio height/width. Algorithm generates perpendicular ines to
right
dataframe features everydistance
and measures values on intersectionwith features ofleft
. If no feature is reached withintick_length
its value is set as width (being a theoretical maximum).Derived from [Araldi and Fusco, 2019].
- Parameters
- leftGeoDataFrame
GeoDataFrame containing streets to analyse
- rightGeoDataFrame
GeoDataFrame containing buildings along the streets (only Polygon geometry type is supported)
- heights: str, list, np.array, pd.Series (default None)
the name of the buildings dataframe column,
np.array
, orpd.Series
where is stored building height. If set to None, height and ratio height/width will not be calculated.- distanceint (default 10)
distance between perpendicular ticks
- tick_lengthint (default 50)
length of ticks
Examples
>>> street_prof = momepy.StreetProfile(streets_df, buildings_df, heights='height') 100%|██████████| 33/33 [00:02<00:00, 15.66it/s] >>> streets_df['width'] = street_prof.w >>> streets_df['deviations'] = street_prof.wd
- Attributes
- wSeries
Series containing street profile width values
- wdSeries
Series containing street profile standard deviation values
- oSeries
Series containing street profile openness values
- hSeries
Series containing street profile heights values. Returned only when heights is set.
- hdSeries
Series containing street profile heights standard deviation values. Returned only when heights is set.
- pSeries
Series containing street profile height/width ratio values. Returned only when heights is set.
- leftGeoDataFrame
original left GeoDataFrame
- rightGeoDataFrame
original right GeoDataFrame
- distanceint
distance between perpendicular ticks
- tick_lengthint
length of ticks
- heightsGeoDataFrame
Series containing used height values
Methods
__init__
(left, right[, heights, distance, ...])