momepy.CourtyardArea#
- momepy.CourtyardArea(gdf, areas=None)[source]#
Calculates area of holes within geometry - area of courtyards.
- Parameters:
- gdfGeoDataFrame
A GeoDataFrame containing objects to analyse.
- areasstr, list, np.array, pd.Series (default None)
The name of the dataframe column,
np.array
, orpd.Series
where area values are stored. If set toNone
, this will calculate areas during the process without saving them separately.
- Attributes:
- seriesSeries
Series containing resulting values.
- gdfGeoDataFrame
The original GeoDataFrame.
- areasGeoDataFrame
A Series containing used areas values.
Examples
>>> buildings['courtyard_area'] = momepy.CourtyardArea(buildings).series >>> buildings.courtyard_area[80] 353.33274206543274