wk_orient: Orient polygon coordinates

View source: R/orient-filter.R

wk_orientR Documentation

Orient polygon coordinates

Description

Orient polygon coordinates

Usage

wk_orient(handleable, ..., direction = wk_counterclockwise())

wk_orient_filter(handler, direction = wk_counterclockwise())

wk_clockwise()

wk_counterclockwise()

Arguments

handleable

A geometry vector (e.g., wkb(), wkt(), xy(), rct(), or sf::st_sfc()) for which wk_handle() is defined.

...

Passed to the wk_handle() method.

direction

The winding polygon winding direction

handler

A wk_handler object.

Value

handleable with consistently oriented polygons, in direction winding order.

Examples

wk_orient(wkt("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))"))
wk_orient(
  wkt("POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))"),
  direction = wk_clockwise()
)


wk documentation built on Oct. 12, 2024, 1:07 a.m.