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 orientation of object

\[\left|{\textit{building orientation} - \textit{cell orientation}}\right|\]
Parameters
leftGeoDataFrame

GeoDataFrame containing objects to analyse

rightGeoDataFrame

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 is stored object orientation value (can be calculated using momepy.Orientation)

right_orientationsstr, list, np.array, pd.Series

the name of the right dataframe column, np.array, or pd.Series where is stored object orientation value (can be calculated using momepy.Orientation)

left_unique_idstr
the name of the left dataframe column with unique id shared between left

and right gdf

right_unique_idstr

the name of the right dataframe column with unique id shared between left and right gdf

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

Series containing resulting values

leftGeoDataFrame

original left GeoDataFrame

rightGeoDataFrame

original right GeoDataFrame

left_orientationsSeries

Series containing used left orientations

right_orientationsSeries

Series containing used right orientations

left_unique_idSeries

Series containing used left ID

right_unique_idSeries

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, ...)