momepy.Area

class momepy.Area(gdf)[source]

Calculates area of each object in given GeoDataFrame. It can be used for any suitable element (building footprint, plot, tessellation, block).

It is a simple wrapper for geopandas gdf.geometry.area for the consistency of momepy.

Parameters:
gdf : GeoDataFrame

GeoDataFrame containing objects to analyse

Examples

>>> buildings = gpd.read_file(momepy.datasets.get_path('bubenec'), layer='buildings')
>>> buildings['area'] = momepy.Area(buildings).series
>>> buildings.area[0]
728.5574947044363
Attributes:
series : Series

Series containing resulting values

gdf : GeoDataFrame

original GeoDataFrame

__init__(self, gdf)[source]

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

Methods

__init__(self, gdf) Initialize self.