wk_trans_explicit: Transform using explicit coordinate values

View source: R/trans-explicit.R

wk_trans_explicitR Documentation

Transform using explicit coordinate values

Description

A wk_trans implementation that replaces coordinate values using a vector of pre-calculated coordinates. This is used to perform generic transforms using R functions and system calls that are impossible or impractical to implement at the C level.

Usage

wk_trans_explicit(value, use_z = NA, use_m = NA)

Arguments

value

An xy(), xyz(), xym(), or xyzm() of coordinates used to replace values in the input. Use NA to keep the existing value.

use_z, use_m

Used to declare the output type. Use TRUE to ensure the output has that dimension, FALSE to ensure it does not, and NA to leave the dimension unchanged.

See Also

wk_coords() which has a replacement version "⁠wk_coords<-⁠"

Examples

trans <- wk_trans_explicit(xy(1:5, 1:5))
wk_transform(rep(xy(0, 0), 5), trans)

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