wksxp {wk}R Documentation

Mark lists as well-known "S" expressions

Description

Mark lists as well-known "S" expressions

Usage

wksxp(x = list())

parse_wksxp(x)

as_wksxp(x, ...)

## Default S3 method:
as_wksxp(x, ...)

## S3 method for class 'character'
as_wksxp(x, ...)

## S3 method for class 'wk_wksxp'
as_wksxp(x, ..., include_z = NULL, include_m = NULL, include_srid = NULL)

## S3 method for class 'wk_wkt'
as_wksxp(x, ..., include_z = NULL, include_m = NULL, include_srid = NULL)

## S3 method for class 'wk_wkb'
as_wksxp(x, ..., include_z = NULL, include_m = NULL, include_srid = NULL)

Arguments

x

A list() features (see details)

...

Unused

include_z

Include the values of the Z and M coordinates and/or SRID in the output? Use FALSE to omit, TRUE to include, or NA to include only if present. Note that using TRUE may result in an error if there is no value present in the original.

include_m

Include the values of the Z and M coordinates and/or SRID in the output? Use FALSE to omit, TRUE to include, or NA to include only if present. Note that using TRUE may result in an error if there is no value present in the original.

include_srid

Include the values of the Z and M coordinates and/or SRID in the output? Use FALSE to omit, TRUE to include, or NA to include only if present. Note that using TRUE may result in an error if there is no value present in the original.

Details

The "wksxp" format is experimental, but was written as a way to make it possible for packages to generate wkb() vectors without needing to use C++. The format represents geometries as following:

Any geometry that isn't in a multi type must have meta information encoded as attributes. The attribures that are used are:

This is similar to the sf::st_sfc() format, but the formats aren't interchangable.

Value

A new_wk_wksxp()

Examples

wksxp(wkt_translate_wksxp("POINT (20 10)"))


[Package wk version 0.3.4 Index]