momepy.Squareness

class momepy.Squareness(gdf)[source]

Calculates squareness of each object in given geoDataFrame.

Uses only external shape (shapely.geometry.exterior), courtyards are not included.

\[\mu=\frac{\sum_{i=1}^{N} d_{i}}{N}\]

where d is the deviation of angle of corner i from 90 degrees.

Parameters
gdfGeoDataFrame

GeoDataFrame containing objects

References

Dibble, J. (2016) Urban Morphometrics: Towards a Quantitative Science of Urban Form. University of Strathclyde.

Examples

>>> buildings_df['squareness'] = momepy.Squareness(buildings_df).series
100%|██████████| 144/144 [00:01<00:00, 129.49it/s]
>>> buildings_df.squareness[0]
3.7075816043359864
Attributes
seriesSeries

Series containing resulting values

gdfGeoDataFrame

original GeoDataFrame

__init__(self, gdf)[source]

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

Methods

__init__(self, gdf)

Initialize self.