momepy.
FractalDimension
Calculates fractal dimension of each object in given GeoDataFrame.
Based on [McG95].
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.
np.array
pd.Series
None
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.
Examples
>>> buildings_df['fractal'] = momepy.FractalDimension(buildings_df, ... 'area', ... 'peri').series >>> buildings_df.fractal[0] 1.0726778567038908
Series containing resulting values
original GeoDataFrame
Series containing used perimeter values
Series containing used area values
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(gdf[, areas, perimeters])
Initialize self.