Learn R Programming

tigers (version 0.1-3)

area: Area of Polygon

Description

This function computes the area of a polygon with Euclidean coordinates (e.g., UTM).

Usage

area(x, y = NULL)

Value

a single numeric value giving the area of the polygon.

Arguments

x, y

the coordinates of the points given in the usual way in R.

Author

Emmanuel Paradis

Details

The unit of the area are the squared unit of input coordinates by default.

See Also

geod

Examples

Run this code
XY <- rbind(c(0, 0),
            c(1, 0),
            c(.25, .25),
            c(.5, .5),
            c(1.2, .8),
            c(1, .78),
            c(0, 1))
area(XY)

Run the code above in your browser using DataLab