CCcheck: Counter Clockwise check

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/CCcheck.R

Description

Check for counter-clockwise orientation for polygons. Positive is counterclockwise.

Usage

1

Arguments

Z

list(x,y)

Details

Uses sign of the area of the polygon to determine polarity.

Value

j

sign of area

Note

Based on the idea calculated area of a polygon.

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
Y=list()
Y$x=c(170,175,184,191,194,190,177,166,162,164)
Y$y=c(-54,-60,-60,-50,-26,8,34,37,10,-15)

plot(c(160, 200),c(-85, 85), type='n')
points(Y)
lines(Y)

CCcheck(Y)


Z = list(x=rev(Y$x), y=rev(Y$y))

CCcheck(Z)

GEOmap documentation built on May 2, 2019, 8:56 a.m.