momepy.EquivalentRectangularIndex

class momepy.EquivalentRectangularIndex(gdf, areas=None, perimeters=None)[source]

Calculates equivalent rectangular index of each object in given geoDataFrame.

\[\sqrt{{area} \over \textit{area of bounding rectangle}} * {\textit{perimeter of bounding rectangle} \over {perimeter}}\]
Parameters:
gdf : GeoDataFrame

GeoDataFrame containing objects

areas : str, list, np.array, pd.Series (default None)

the name of the dataframe column, np.array, or pd.Series where is stored area value. If set to None, function will calculate areas during the process without saving them separately.

perimeters : str, list, np.array, pd.Series (default None)

the name of the dataframe column, np.array, or pd.Series where is stored perimeter value. If set to None, function will calculate perimeters during the process without saving them separately.

References

Basaraner M and Cetinkaya S (2017) Performance of shape indices and classification schemes for characterising perceptual shape complexity of building footprints in GIS. 2nd ed. International Journal of Geographical Information Science, Taylor & Francis 31(10): 1952–1977. Available from: https://www.tandfonline.com/doi/full/10.1080/13658816.2017.1346257.

Examples

>>> buildings_df['eri'] = momepy.EquivalentRectangularIndex(buildings_df, 'area', 'peri').series
100%|██████████| 144/144 [00:00<00:00, 895.57it/s]
>>> buildings_df['eri'][0]
0.7879229963118455
Attributes:
series : Series

Series containing resulting values

gdf : GeoDataFrame

original GeoDataFrame

areas : Series

Series containing used area values

perimeters : Series

Series containing used perimeter values

__init__(self, gdf, areas=None, perimeters=None)[source]

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

Methods

__init__(self, gdf[, areas, perimeters]) Initialize self.