momepy.form_factor¶
- momepy.form_factor(geometry, height)[source]¶
Calculates the form factor of each object given its geometry and height.
\[surface \over {volume^{2 \over 3}}\]where
\[surface = (perimeter * height) + area\]Adapted from [Bourdic et al., 2012].
Examples
>>> path = momepy.datasets.get_path("bubenec") >>> buildings = geopandas.read_file(path, layer="buildings")Synthesize some building height information.
>>> import numpy as np >>> rng = np.random.default_rng(seed=42) >>> height = rng.integers(low=9, high=30, size=len(buildings))>>> momepy.form_factor(buildings, height) 0 5.588952 1 8.403204 2 5.149302 3 5.381587 4 5.030861 ... 139 6.039771 140 5.904980 141 5.508910 142 5.869335 143 5.378663 Name: form_factor, Length: 144, dtype: float64