sp_transform: Transform Spatial Coordinates

View source: R/helpers.R

sp_transformR Documentation

Transform Spatial Coordinates

Description

Transform Spatial Coordinates

Usage

sp_transform(xy, from = NULL, to = 4326, cols = 1:2)

Arguments

xy

Rows of coordinates (x, y).

from

Initial projection as numeric (EPSG code), character (proj4 string), or CRS.

to

Target projection as numeric (EPSG code), character (proj4 string), or CRS.

cols

Column numbers or names specifying which xy columns are x and y coordinates.

Value

Transformed coordinates coerced to the same class as xy.

See Also

spTransform

Other helper functions: capitalize_words, ch1903_to_wgs84, clean_strings, format_addresses, format_scientific_names, is.empty, lvapply, melt_by_listcol, na.remove, normalize_language, parse_scientific_names, quotemeta, replace_values_in_list, subset_search_results, unique_na

Examples

from <- 21781
to <- 4326
sp_transform(sp_transform(c(500, 1000), from, to), to, from)

falling-fruit/fruitr documentation built on Dec. 21, 2024, 8:32 p.m.