View source: R/sgo_transform.R
sgo_transform | R Documentation |
Transforms the coordinate system of a set of points to any supported coordinate system.
sgo_transform(x, to = NULL, ...)
x |
A |
to |
Specifies the EPSG code to convert the coordinates to. See
|
... |
Additional parameters passed to internal functions. Currently it
supports the additional arguments seen in |
This function is a wrapper of specific transformation functions
(sgo_bng_lonlat
, sgo_en_wgs84
,
sgo_lonlat_bng
, sgo_wgs84_en
,
sgo_laea_etrs
, sgo_etrs_laea
,
sgo_cart_lonlat
, sgo_lonlat_cart
) that transforms
the coordinate system of a set of points to any of the supported coordinate
systems.
Please note that this package assumes that the Coordinate Reference Systems (CRS) ETRS89 and WGS84 are the same within the UK, but this shouldn't be a problem for most civilian use of GPS satellites. If a high-precision transformation between WGS84 and ETRS89 is required then it is recommended to use a different package to do the conversion.
According to the Transformations and OSGM15 User Guide, p. 8: "...ETRS89 is a precise version of the better known WGS84 reference system optimised for use in Europe; however, for most purposes it can be considered equivalent to WGS84." and "For all navigation, mapping, GIS, and engineering applications within the tectonically stable parts of Europe (including UK and Ireland), the term ETRS89 should be taken as synonymous with WGS84.".
Warning: Coordinates defined in the Geodetic Coordinate System EPSG:4277 (with datum OSGB 1936) should only be used to convert to or from BNG coordinates and for historical reasons only.
An object of class 'sgo_points'.
sgo_points
, sgo_coordinates
,
sgo_set_gcs
, sgo_bng_ngr
ln <- c(-4.22472, -2.09908) lt <- c(57.47777, 57.14965) n <- c("Inverness", "Aberdeen") df <- data.frame(n, ln, lt, stringsAsFactors = FALSE) locations <- sgo_points(df, coords=c("ln", "lt"), epsg=4326) locations.bng <- sgo_transform(locations, to=27700) locations.osgb36 <- sgo_transform(locations, to=4277) locations.ngr <- sgo_bng_ngr(sgo_transform(locations, to=27700)) locations.wgs84EN <- sgo_transform(locations.bng, to=3857)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.