Use data.frame with wk

# S3 method for data.frame
wk_handle(handleable, handler, ...)

# S3 method for data.frame
wk_writer(handleable, ...)

# S3 method for data.frame
wk_crs(x)

# S3 method for data.frame
wk_set_crs(x, crs)

# S3 method for data.frame
wk_is_geodesic(x)

# S3 method for data.frame
wk_set_geodesic(x, geodesic)

# S3 method for data.frame
wk_restore(handleable, result, ...)

# S3 method for tbl_df
wk_restore(handleable, result, ...)

# S3 method for data.frame
wk_translate(handleable, to, ...)

# S3 method for tbl_df
wk_translate(handleable, to, ...)

# S3 method for sf
wk_translate(handleable, to, ...)

# S3 method for sf
wk_restore(handleable, result, ...)

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.

x

Objects whose "crs" attribute is used to carry a CRS.

crs

An object that can be interpreted as a CRS

geodesic

TRUE if edges must be interpolated as geodesics when coordinates are spherical, FALSE otherwise.

result

The result of a filter operation intended to be a transformation.

to

A prototype object.

Examples

wk_handle(data.frame(a = wkt("POINT (0 1)")), wkb_writer())
#> <wk_wkb[1]>
#> [1] <POINT (0 1)>
wk_translate(wkt("POINT (0 1)"), data.frame(col_name = wkb()))
#>        col_name
#> 1 <POINT (0 1)>
wk_translate(data.frame(a = wkt("POINT (0 1)")), data.frame(wkb()))
#>               a
#> 1 <POINT (0 1)>