wk_linestring: Create lines, polygons, and collections

View source: R/make.R

wk_linestringR Documentation

Create lines, polygons, and collections

Description

Create lines, polygons, and collections

Usage

wk_linestring(handleable, feature_id = 1L, ..., geodesic = NULL)

wk_polygon(handleable, feature_id = 1L, ring_id = 1L, ..., geodesic = NULL)

wk_collection(
  handleable,
  geometry_type = wk_geometry_type("geometrycollection"),
  feature_id = 1L,
  ...
)

wk_linestring_filter(handler, feature_id = 1L)

wk_polygon_filter(handler, feature_id = 1L, ring_id = 1L)

wk_collection_filter(
  handler,
  geometry_type = wk_geometry_type("geometrycollection"),
  feature_id = 1L
)

Arguments

handleable

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

feature_id

An identifier where changes in sequential values indicate a new feature. This is recycled silently as needed.

...

Passed to the wk_handle() method.

geodesic

Use TRUE or FALSE to explicitly force the geodesic-ness of the output.

ring_id

An identifier where changes in sequential values indicate a new ring. Rings are automatically closed. This is recycled silently as needed.

geometry_type

The collection type to create.

handler

A wk_handler object.

Value

An object of the same class as handleable with whose coordinates have been assembled into the given type.

Examples

wk_linestring(xy(c(1, 1), c(2, 3)))
wk_polygon(xy(c(0, 1, 0), c(0, 0, 1)))
wk_collection(xy(c(1, 1), c(2, 3)))


wk documentation built on Oct. 22, 2023, 9:07 a.m.