POLY_AREA

The POLY_AREA function returns the area of a polygon given the coordinates of its vertices. This value is always positive.

It is assumed that the polygon has n vertices with n sides and the edges connect the vertices in the order:

[(x1,y1), (x2,y2), ... , (x n ,y n ), (x1,y1)]

such that the last vertex is connected to the first vertex.

This routine is written in the IDL language. Its source code can be found in the file poly_area.pro in the lib subdirectory of the IDL distribution.

Calling Sequence

Result = POLY_AREA( X, Y )

Arguments

X

An n -element vector of X coordinate locations for the vertices.

Y

An n -element vector of Y coordinate locations for the vertices.

Example

See Also

DEFROI , POLYFILLV