geo_set_z: Work with Z values

Description Usage Arguments Value Examples

View source: R/geo-z.R

Description

Currently, geovctrs supports X, Y, and Z coordinates. These functions extract, set, and drop Z values.

Usage

1
2
3
4
5
6
7
8
9

Arguments

x

A geometry-like object, or one that can be coerced to a geometry-like object using as_geovctr().

z

A vector of z coordinate values.

...

Unused

na.rm

Should NAs be removed?

finite

Should only finite values be considered? TRUE implies na.rm = TRUE.

Value

A modified version of x.

Examples

1
2
3
4
5
geo_set_z(c("POINT (2 3)", "POINT Z (2 3 4)"), 10)
geo_drop_z(c("POINT (2 3)", "POINT Z (2 3 4)"))
geo_has_z(c("POINT (2 3)", "POINT Z (2 3 4)"))
geo_z_range(c("POINT (2 3)", "POINT Z (2 3 4)"), na.rm = TRUE)
geo_z_envelope(c("POINT (2 3)", "POINT Z (2 3 4)"), na.rm = TRUE)

paleolimbot/geovctrs documentation built on July 30, 2020, 3:41 p.m.