momepy.CourtyardArea#

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

Calculates area of holes within geometry - area of courtyards.

Expects pygeos backend of geopandas.

Parameters
gdfGeoDataFrame

GeoDataFrame containing objects to analyse

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

Examples

>>> buildings['courtyard_area'] = momepy.CourtyardArea(buildings).series
>>> buildings.courtyard_area[80]
353.33274206543274
Attributes
seriesSeries

Series containing resulting values

gdfGeoDataFrame

original GeoDataFrame

areasGeoDataFrame

Series containing used areas values

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

Methods

__init__(gdf[, areas])