momepy.StreetProfile

class momepy.StreetProfile(left, right, heights=None, distance=10, tick_length=50)[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 lines to right dataframe features every distance and measures values on intersection with features of left. If no feature is reached within tick_length its value is set as width (being theoretical maximum).

\[\\]
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, or pd.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)

lenght of ticks

References

Oliveira V (2013) Morpho: a methodology for assessing urban form. Urban Morphology 17(1): 21–33.

Araldi A and Fusco G (2017) Decomposing and Recomposing Urban Fabric: The City from the Pedestrian Point of View. In: Gervasi O, Murgante B, Misra S, et al. (eds), Computational Science and Its Applications – ICCSA 2017, Lecture Notes in Computer Science, Cham: Springer International Publishing, pp. 365–376. Available from: http://link.springer.com/10.1007/978-3-319-62407-5.

Examples

>>> street_profile = momepy.StreetProfile(streets_df, buildings_df, heights='height')
100%|██████████| 33/33 [00:02<00:00, 15.66it/s]
>>> streets_df['width'] = street_profile.w
>>> streets_df['deviations'] = street_profile.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

lenght of ticks

heightsGeoDataFrame

Series containing used height values

__init__(self, left, right, heights=None, distance=10, tick_length=50)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(self, left, right[, heights, …])

Initialize self.