ga_signed_area() returns positive values for counter-clockwise winding and
negative values for clockwise winding. ga_unsigned_area() always returns a
non-negative value.
See also
Other area:
ga_signed_area_cd(),
ga_signed_area_geodesic()
Examples
fp <- system.file("shape/nc.shp", package = "sf")
nc <- as.data.frame(read_shapefile(fp))
# nc rings wind clockwise, so the signed area is negative
head(as.vector(ga_signed_area(nc$geometry)))
#> [1] -0.11428350 -0.06139976 -0.14301628 -0.06977098 -0.15275930 -0.09715756
head(as.vector(ga_unsigned_area(nc$geometry)))
#> [1] 0.11428350 0.06139976 0.14301628 0.06977098 0.15275930 0.09715756