jarea {GEOmap} | R Documentation |
Area of closed polygon.
Description
Returns area of polygon.
Usage
jarea(L)
Arguments
L |
list with x,y components |
Details
If polygon is counter clockwise (CCW) area will be positive, else negative. If not sure, take absolute value of output.
Value
Area in dimensions of x,y
Author(s)
Jonathan M. Lees<jonathan.lees@unc.edu>
Examples
set.seed(12)
X = runif(10, 1, 100)
Y = runif(10, 1, 100)
hc = chull(X, Y)
#### looks like chull returns points in clockwise
L = list(x=X[hc] , y=Y[hc] )
j1 = jarea(L )
######### reverse order of polygon
jc = rev(hc)
L = list(x=X[jc] , y=Y[jc] )
j2 = jarea(L )
[Package GEOmap version 2.5-11 Index]