momepy.EquivalentRectangularIndex#

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

Calculates the equivalent rectangular index of each object in a given GeoDataFrame.

\[\sqrt{{area} \over \textit{area of bounding rectangle}} * {\textit{perimeter of bounding rectangle} \over {perimeter}}\]

Based on [Basaraner and Cetinkaya, 2017].

Parameters:
gdfGeoDataFrame

A GeoDataFrame containing objects.

areasstr, list, np.array, pd.Series (default None)

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

perimetersstr, list, np.array, pd.Series (default None)

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

Examples

>>> buildings_df['eri'] = momepy.EquivalentRectangularIndex(buildings_df,
...                                                         'area',
...                                                         'peri').series
>>> buildings_df['eri'][0]
0.7879229963118455
Attributes:
seriesSeries

A Series containing resulting values.

gdfGeoDataFrame

The original GeoDataFrame.

areasSeries

A Series containing used area values.

perimetersSeries

A Series containing used perimeter values.

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

Methods

__init__(gdf[, areas, perimeters])