momepy.
FormFactor
(gdf, volumes, areas=None)[source]¶Calculates form factor of each object in given geoDataFrame.
GeoDataFrame containing objects
the name of the dataframe column, np.array, or pd.Series where is stored volume value.
(To calculate volume you can use momepy.volume()
)
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.
References
Bourdic, L., Salat, S. and Nowacki, C. (2012) ‘Assessing cities: a new system of cross-scale spatial indicators’, Building Research & Information, 40(5), pp. 592–605. doi: 10.1080/09613218.2012.703488self.
Examples
>>> buildings_df['formfactor'] = momepy.FormFactor(buildings_df, 'volume').series
>>> buildings_df.formfactor[0]
1.9385988170288635
>>> buildings_df['formfactor'] = momepy.FormFactor(buildings_df, momepy.volume(buildings_df, 'height').volume).series
>>> buildings_df.formfactor[0]
1.9385988170288635
Series containing resulting values
original GeoDataFrame
Series containing used volume values
Series containing used area values
__init__
(self, gdf, volumes, areas=None)[source]¶Initialize self. See help(type(self)) for accurate signature.
Methods
|
Initialize self. |