momepy.
FractalDimension
(gdf, areas=None, perimeters=None)[source]¶Calculates fractal dimension of each object in given geoDataFrame.
GeoDataFrame containing objects
the name of the dataframe column, np.array, or pd.Series where is stored area value. If set to None, function will calculate areas during the process without saving them separately.
the name of the dataframe column, np.array, or pd.Series where is stored perimeter value. If set to None, function will calculate perimeters during the process without saving them separately.
References
McGarigal, K., & Marks, B. (1995). FRAGSTATS: spatial pattern analysis program for quantifying landscape structure.
Examples
>>> buildings_df['fractal'] = momepy.FractalDimension(buildings_df, 'area', 'peri').series
100%|██████████| 144/144 [00:00<00:00, 3928.09it/s]
>>> buildings_df.fractal[0]
1.0726778567038908
Series containing resulting values
original GeoDataFrame
Series containing used perimeter values
Series containing used area values
__init__
(self, gdf, areas=None, perimeters=None)[source]¶Initialize self. See help(type(self)) for accurate signature.
Methods
|
Initialize self. |