Learn R Programming

sf (version 0.9-0)

sf_project: directly transform a set of coordinates

Description

directly transform a set of coordinates

Usage

sf_project(from, to, pts, keep = FALSE, warn = TRUE)

Arguments

from

character description of source CRS, or object of class crs

to

character description of target CRS, or object of class crs

pts

two-column numeric matrix, or object that can be coerced into a matrix

keep

logical value controlling the handling of unprojectable points. If `keep` is `TRUE`, then such points will yield `Inf` or `-Inf` in the return value; otherwise an error is reported and nothing is returned.

warn

logical; if TRUE, warn when non-finite values are generated

Value

two-column numeric matrix with transformed/converted coordinates, returning invalid values as Inf