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

sf_project

directly transform a set of coordinates


Description

directly transform a set of coordinates

Usage

sf_add_proj_units()

sf_project(
  from = character(0),
  to = character(0),
  pts,
  keep = FALSE,
  warn = TRUE,
  authority_compliant = st_axis_order()
)

Arguments

from

character description of source CRS, or object of class crs, or pipeline describing a transformation

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

authority_compliant

logical; TRUE means handle axis order authority compliant (e.g. EPSG:4326 implying x=lat, y=lon), FALSE means use visualisation order (i.e. always x=lon, y=lat)

Details

sf_add_proj_units loads the PROJ units 'link', 'us_in', 'ind_yd', 'ind_ft', and 'ind_ch' into the udunits database, and returns TRUE invisibly on success.

Value

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


sf

Simple Features for R

v0.9-8
GPL-2 | MIT + file LICENSE
Authors
Edzer Pebesma [aut, cre] (<https://orcid.org/0000-0001-8049-7069>), Roger Bivand [ctb] (<https://orcid.org/0000-0003-2392-6140>), Etienne Racine [ctb], Michael Sumner [ctb], Ian Cook [ctb], Tim Keitt [ctb], Robin Lovelace [ctb], Hadley Wickham [ctb], Jeroen Ooms [ctb] (<https://orcid.org/0000-0002-4035-0289>), Kirill Müller [ctb], Thomas Lin Pedersen [ctb], Dan Baston [ctb]
Initial release

We don't support your browser anymore

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