This function calculates the compactness ratios for the aggregated areas.

It checks whether the projection of a spatial polygons data frame is in lat/long format. If the check passes, the function assigns an alternate projection. The spatial polygons data frame is then used to calculate compactness ratio. The function returns a vector of ratios.

calculateGATcompactness(myshp)

Arguments

myshp

A spatial layer.

Examples

calculateGATcompactness(myshp = hftown)
#>  [1] 0.6028730 0.4862550 0.5522028 0.4423821 0.3722667 0.3259063 0.5579689
#>  [8] 0.4011664 0.5072589 0.5265989 0.3017864 0.3738211 0.1766651 0.4732838
#> [15] 0.4677102 0.5011990 0.5153142 0.2574866 0.4872009 0.3432215 0.3194996