polyarea: Area of Polygon(s)

polyareaR Documentation

Area of Polygon(s)

Description

Area of a single closed polygon (simple x-y coordinate input) or of multiple polygons, possibly with holes.

Usage

polyarea(xy, ha = TRUE)

Arguments

xy

dataframe or list with components ‘x’ and ‘y’, or a SpatialPolygons or SpatialPolygonsDataFrame object from package sp, or an sf object with polygon data

ha

logical if TRUE output is converted from square metres to hectares

Details

For sf, sfc, SpatialPolygons or SpatialPolygonsDataFrame objects, the package sf is used.

Value

A scalar.

See Also

bufferContour

Examples

polyarea(make.grid(hollow = TRUE))

secr documentation built on Nov. 4, 2024, 9:06 a.m.