Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

wk_crs_inherit

Special CRS values


Description

The CRS handling in the wk package requires two sentinel CRS values. The first, wk_crs_inherit(), signals that the vector should inherit a CRS of another vector if combined. This is useful for empty, NULL, and/or zero-length geometries. The second, wk_crs_auto(), is used as the default argument of crs for constructors so that zero-length geometries are assigned a CRS of wk_crs_inherit() by default.

Usage

wk_crs_inherit()

wk_crs_auto()

wk_crs_auto_value(x, crs)

Arguments

x

A raw input to a construuctor whose length and crs attributte is used to determine the default CRS returned by wk_crs_auto().

crs

A value for the coordinate reference system supplied by the user.

Examples

wk_crs_auto_value(list(), wk_crs_auto())
wk_crs_auto_value(list(), 1234)
wk_crs_auto_value(list(NULL), wk_crs_auto())

wk

Lightweight Well-Known Geometry Parsing

v0.4.1
MIT + file LICENSE
Authors
Dewey Dunnington [aut, cre] (<https://orcid.org/0000-0002-9415-4582>), Edzer Pebesma [aut] (<https://orcid.org/0000-0001-8049-7069>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.