- class momepy.Orientation(gdf, verbose=True)#
Calculate the orientation of object. The deviation of orientation from cardinal directions are captured. Here ‘orientation’ is defined as an orientation of the longest axis of bounding rectangle in range 0 - 45. The orientation of LineStrings is represented by the orientation of the line connecting the first and the last point of the segment.
Adapted from [Schirmer and Axhausen, 2015].
A GeoDataFrame containing objects to analyse.
- verbosebool (default True)
True, shows progress bars in loops and indication of steps.
>>> buildings_df['orientation'] = momepy.Orientation(buildings_df).series 100%|██████████| 144/144 [00:00<00:00, 630.54it/s] >>> buildings_df['orientation'] 41.05146788287027
A Series containing resulting values.
The original GeoDataFrame.
- __init__(gdf, verbose=True)#