check_ring_dir {cartogramR} | R Documentation |
Polygon rings directions are checked and corrected if asked.
Description
Polygon ring are seen from above: exterior ring counter clockwise, holes clockwise
Usage
check_ring_dir(polygons, check.only = TRUE)
Arguments
polygons |
a sfc object which contains simple feature geometry of
types |
check.only |
a boolean which indicates if the function only
checks the ring direction ( |
Value
Either a logical vector which indicates if line i of polygons
is in the right direction (TRUE
) or not or the corrected sfc object
Examples
data(usa)
all(check_ring_dir(sf::st_geometry(usa), check.only=TRUE))
[Package cartogramR version 1.1-0 Index]