momepy.CellAlignment#
- class 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
left
dataframe 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
right
dataframe column,np.array
, orpd.Series
where object orientation values are stored. This can be calculated usingmomepy.Orientation
.- left_unique_idstr
The name of the
left
dataframe column with a unique ID shared between theleft
andright
GeoDataFrame objects.- right_unique_idstr
The name of the
right
dataframe column with a unique ID shared between theleft
andright
GeoDataFrame objects.
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
- Attributes:
- seriesSeries
A Series containing resulting values.
- leftGeoDataFrame
The original
left
GeoDataFrame.- rightGeoDataFrame
The original
right
GeoDataFrame.- left_orientationsSeries
A Series containing used
left
orientations.- right_orientationsSeries
A Series containing used
right
orientations.- left_unique_idSeries
A Series containing used
left
ID.- right_unique_idSeries
A Series containing used
right
ID.
- __init__(left, right, left_orientations, right_orientations, left_unique_id, right_unique_id)[source]#
Methods
__init__
(left, right, left_orientations, ...)