Learn R Programming

terra (version 1.7-83)

forceCCW: force counter-clockwise polygons

Description

Assure that the nodes of outer rings of polygons are in counter-clockwise order.

Usage

# S4 method for SpatVector
forceCCW(x)

Value

SpatVector

Arguments

x

SpatVector of polygons

Examples

Run this code
p <- vect("POLYGON ((2 45, 2 55, 18 55, 18 45, 2 45))")
pcc <- forceCCW(p)
geom(pcc, wkt=TRUE)

Run the code above in your browser using DataLab