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).
GeoDataFrame containing streets to analyse
GeoDataFrame containing buildings along the streets (only Polygon geometry type is supported)
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.
distance between perpendicular ticks
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
Series containing street profile width values
Series containing street profile standard deviation values
Series containing street profile openness values
Series containing street profile heights values. Returned only when heights is set.
Series containing street profile heights standard deviation values. Returned only when heights is set.
Series containing street profile height/width ratio values. Returned only when heights is set.
original left GeoDataFrame
original right GeoDataFrame
distance between perpendicular ticks
lenght of ticks
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
|
Initialize self. |