momepy.
Linearity
Calculates linearity of each LineString object in given GeoDataFrame.
where l is the length of the LineString. MultiLineString returns np.nan.
np.nan
Adapted from [AF19].
GeoDataFrame containing objects
if True, shows progress bars in loops and indication of steps
Examples
>>> streets_df['linearity'] = momepy.Linearity(streets_df).series >>> streets_df['linearity'][0] 1.0
Series containing mean distance values.
original GeoDataFrame
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(gdf[, verbose])
Initialize self.