momepy.Linearity

class momepy.Linearity(gdf)[source]

Calculates linearity of each LineString object in given geoDataFrame.

\[\frac{l_{euclidean}}{l_{segment}}\]

where l is the length of the LineString.

Parameters
gdfGeoDataFrame

GeoDataFrame containing objects

References

Araldi A and Fusco G (2017) Decomposing and Recomposing Urban Fabric: The City from the Pedestrian Point of View. In:, pp. 365–376. Available from: http://link.springer.com/10.1007/978-3-319-62407-5.

Examples

>>> streets_df['linearity'] = momepy.Linearity(streets_df).series
100%|██████████| 33/33 [00:00<00:00, 1737.64it/s]
>>> streets_df['linearity'][0]
1.0
Attributes
seriesSeries

Series containing mean distance values.

gdfGeoDataFrame

original GeoDataFrame

__init__(self, gdf)[source]

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

Methods

__init__(self, gdf)

Initialize self.