momepy.CellAlignment#
- momepy.CellAlignment(left, right, left_orientations, right_orientations, left_unique_id, right_unique_id)[source]#
Calculate the difference between cell orientation and the orientation of object.
\[\left|{\textit{building orientation} - \textit{cell orientation}}\right|\]- Parameters:
- leftGeoDataFrame
A GeoDataFrame containing objects to analyse.
- rightGeoDataFrame
A GeoDataFrame containing tessellation cells (or relevant spatial units).
- left_orientationsstr, list, np.array, pd.Series
The name of the
leftdataframe column,np.array, or pd.Series` where object orientation values are stored. This can be calculated usingmomepy.Orientation.- right_orientationsstr, list, np.array, pd.Series
The name of the
rightdataframe column,np.array, orpd.Serieswhere object orientation values are stored. This can be calculated usingmomepy.Orientation.- left_unique_idstr
The name of the
leftdataframe column with a unique ID shared between theleftandrightGeoDataFrame objects.- right_unique_idstr
The name of the
rightdataframe column with a unique ID shared between theleftandrightGeoDataFrame objects.
- Attributes:
- seriesSeries
A Series containing resulting values.
- leftGeoDataFrame
The original
leftGeoDataFrame.- rightGeoDataFrame
The original
rightGeoDataFrame.- left_orientationsSeries
A Series containing used
leftorientations.- right_orientationsSeries
A Series containing used
rightorientations.- left_unique_idSeries
A Series containing used
leftID.- right_unique_idSeries
A Series containing used
rightID.
Examples
>>> buildings_df['cell_alignment'] = momepy.CellAlignment(buildings_df, ... tessellation_df, ... 'bl_orient', ... 'tes_orient', ... 'uID', ... 'uID').series >>> buildings_df['cell_alignment'][0] 0.8795123936951939