S3 details for geovctrs_wkt

new_geovctrs_wkt(
  x = character(),
  trim = TRUE,
  precision = 16L,
  dimensions = 3L
)

is_geovctrs_wkt(x)

validate_geovctrs_wkt(x)

# S3 method for geovctrs_wkt
vec_cast(x, to, ...)

# S3 method for geovctrs_wkt
vec_ptype2(x, y, ...)

Arguments

x

A character vector containing well-known text

trim

Trim unnecessary zeroes in the output?

precision

The rounding precision to use when writing (number of decimal places).

dimensions

The maximum number of dimensions to consider when generating text.

...

Unused

y, to

A prototype to cast to. See vctrs::vec_cast() and vctrs::vec_ptype2()

Examples

wkt <- geo_wkt("POINT (30 10)") is_geovctrs_wkt(wkt)
#> [1] TRUE
# use new_geovctrs_wkt() to skip parse validation if you know # your text is valid WKT new_geovctrs_wkt("POINT (30 10)")
#> <geovctrs_wkt[1]> #> [1] POINT (30 10)