The handler is the basic building block of the wk package. In particular, the wk_handle() generic allows operations written as handlers to "just work" with many different input types. The wk package provides the wk_void() handler, the wk_format() handler, the wk_debug() handler, the wk_problems() handler, and wk_writer()s for wkb(), wkt(), xy(), and sf::st_sfc()) vectors.

# S3 method for wk_crc
wk_handle(
  handleable,
  handler,
  ...,
  n_segments = getOption("wk.crc_n_segments", NULL),
  resolution = getOption("wk.crc_resolution", NULL)
)

# S3 method for wk_rct
wk_handle(handleable, handler, ...)

# S3 method for sfc
wk_handle(handleable, handler, ...)

# S3 method for wk_wkb
wk_handle(handleable, handler, ...)

# S3 method for wk_wkt
wk_handle(handleable, handler, ...)

# S3 method for wk_xy
wk_handle(handleable, handler, ...)

wk_handle(handleable, handler, ...)

is_handleable(handleable)

new_wk_handler(handler_ptr, subclass = character())

is_wk_handler(handler)

as_wk_handler(handler, ...)

# S3 method for sfg
wk_handle(handleable, handler, ...)

# S3 method for sf
wk_handle(handleable, handler, ...)

# S3 method for bbox
wk_handle(handleable, handler, ...)

Arguments

handleable

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

handler

A wk_handler object.

...

Passed to the wk_handle() method.

n_segments, resolution

The number of segments to use when approximating a circle. The default uses getOption("wk.crc_n_segments") so that this value can be set for implicit conversions (e.g., as_wkb()). Alternatively, set the minimum distance between points on the circle (used to estimate n_segments). The default is obtained using getOption("wk.crc_resolution").

handler_ptr

An external pointer to a newly created WK handler

subclass

The handler subclass

Value

A WK handler.