momepy.
StreetProfile
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 a theoretical maximum).
right
distance
left
tick_length
Derived from [AF19].
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.
np.array
pd.Series
distance between perpendicular ticks
length of ticks
if True, shows progress bars in loops and indication of steps
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
Series containing used height values
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(left, right[, heights, distance, …])
Initialize self.