Learn R Programming

tmap (version 0.7)

get_polygon_directions: Get and set polygon direction

Description

Get and set the direction of polygons (clockwise or counterclockwise). (Experimental, see ntoe)

Usage

get_polygon_directions(shp, y0_bottom = TRUE)

set_polygon_directions(shp, y0_bottom = TRUE, clockwise = TRUE)

Arguments

shp
shape object, i.e. SpatialPolygons(DataFrame)
y0_bottom
logical: is the y=0 coordinate at the bottom of the screen?
clockwise
logical; should the direction of the polygons be set to clockwise?

Value

  • List of logical vectors, each corresponding to a Polygons object. The values of each vector correspond to the Polygon objects. TRUE means clockwise.