Polygon area

Description

An all-R routine that computes area of all polygons in a SpatialPolygons* object, taking account of holes.

Usage

1

Arguments

x

A spatial object inheriting from SpatialPolygons

Details

Provides the same answer as rgeos::gArea, but is all-R (does not require rgeos Java library) and does not fire a warning if x is un-projected (i.e., lat-long).

Value

Area of all polygons in x, taking account of holes. Units of area are squared units of coordinates in x. E.g., square meters if coordinates in x are UTM meters, square decimal degrees if coordinates in x are lat-long decimal degrees.

Author(s)

Trent McDonald

See Also

sp::SpatialPolygons-class

Examples

1
2
# Area of Washington state, in hectares
a <- polygonArea( WA ) / (100*100)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.