Calculate the entropy of rotation angles for building footprint polygons within zones.
fs_angle_entropy(X, index = NULL, col = NULL, normalize = TRUE) # S3 method for sp fs_angle_entropy(X, index = NULL, col = NULL, normalize = TRUE) # S3 method for sf fs_angle_entropy(X, index = NULL, col = NULL, normalize = TRUE) # S3 method for sfc fs_angle_entropy(X, index = NULL, col = NULL, normalize = TRUE)
X | Spatial object with building footprint polygons |
---|---|
index | A string identifying a column within |
col | column name within |
normalize | A logical value indicating whether to normalize the entropy.
Default is |
unit | character or |
data.table
of zonal indices and values.
This measure uses the angle of the minimum rotated rectangle enclosing each footprint polygon. Entropy is an information criteria measure. When summarising the angles of footprints, higher entropy values may suggest less formally planned or zoned areas. The entropy calculation uses the common Shannon's Entropy. The normalization step produces an indicator for how much a zone departs from a grid. This metric is based on work by Boeing (2019).
Note that this function is provided as a standalone calculation for
convenience. The same summary measure can be executed within
calculate_footstats
by specifying what='angle'
and
how='entropy'
.
Boeing, Geoff (2019). "Urban spatial order: Street network orientation, configuration, and entropy." Applied Network Science, 4(67), https://doi.org/10.1007/s41109-019-0189-1.
data("kampala", package="foot") b <- kampala$buildings # assign random groups idx <- sample(1:10, nrow(b), replace=T) angles <- fs_angle_entropy(b, index=idx, normalize=FALSE)#> Error in UseMethod("as_geos_geometry"): no applicable method for 'as_geos_geometry' applied to an object of class "c('XY', 'POLYGON', 'sfg')"angle_norm <- fs_angle_entropy(b, index=idx, normalize=TRUE)#> Error in UseMethod("as_geos_geometry"): no applicable method for 'as_geos_geometry' applied to an object of class "c('XY', 'POLYGON', 'sfg')"