momepy.Orientation

class momepy.Orientation(gdf)[source]

Calculate the orientation of object

Captures the deviation of orientation from cardinal directions. Defined as an orientation of the longext axis of bounding rectangle in range 0 - 45. Orientation of LineStrings is represented by the orientation of line connecting first and last point of the segment.

Parameters
gdfGeoDataFrame

GeoDataFrame containing objects to analyse

References

Schirmer PM and Axhausen KW (2015) A multiscale classification of urban morphology. Journal of Transport and Land Use 9(1): 101–130. (adapted)

Examples

>>> buildings_df['orientation'] = momepy.Orientation(buildings_df).series
100%|██████████| 144/144 [00:00<00:00, 630.54it/s]
>>> buildings_df['orientation'][0]
41.05146788287027
Attributes
seriesSeries

Series containing resulting values

gdfGeoDataFrame

original GeoDataFrame

__init__(self, gdf)[source]

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

Methods

__init__(self, gdf)

Initialize self.