momepy.FloorArea#

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

Calculates floor area of each object based on height and area. The number of floors is simplified into the formula: height / 3. It is assumed that on average one floor is approximately 3 metres.

\[area * \frac{height}{3}\]
Parameters:
gdfGeoDataFrame

A GeoDataFrame containing objects to analyse.

heightsstr, list, np.array, pd.Series

The name of the dataframe column, np.array, or pd.Series where height values are stored.

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 will calculate areas during the process without saving them separately.

Examples

>>> buildings['floor_area'] = momepy.FloorArea(buildings,
...                                            heights='height_col').series
Calculating floor areas...
Floor areas calculated.
>>> buildings.floor_area[0]
2185.672484113309
>>> buildings['floor_area'] = momepy.FloorArea(buildings, heights='height_col',
...                                            areas='area_col').series
>>> buildings.floor_area[0]
2185.672484113309
Attributes:
seriesSeries

A Series containing resulting values.

gdfGeoDataFrame

The original GeoDataFrame.

heightsSeries

A Series containing used heights values.

areasGeoDataFrame

A Series containing used areas values.

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

Methods

__init__(gdf, heights[, areas])