sgo_set_gcs: Set GCS of a set of points

View source: R/sgo_set_gcs.R

sgo_set_gcsR Documentation

Set GCS of a set of points

Description

Changes the geodetic coordinate system of a set of points using a single Helmert transformation.

Usage

sgo_set_gcs(x, to = NULL)

Arguments

x

A sgo_points object describing a set of points in a geodetic coordinate system.

to

Specifies the EPSG code to convert the coordinates to. Currently it can take any of the following values: 4258, 4937, 4936, 4326, 4979, 4978 or 4277.

Details

Changes the geodetic coordinate system of a set of points. Note that the precision of various datums will vary, and the original WGS-84 is not defined to be accurate to better than ±1 metre. Most transformations shouldn't be assumed to be accurate to better than a meter; between OSGB36 and WGS84 somewhat less - the lost of accuracy can be up to ±5m when using single Helmert transformations.

Input points with a projected coordinate system (e.g. 27700, 7405, 3035 or 3857) are not allowed.

Warning This function is mainly for internal use of the program. Since it relies on a single Helmert transformation it is not recommended to call it directly. Use any other of the transformation functions available (sgo-package).

Value

An object of class 'sgo_points'.

See Also

sgo_points, sgo_transform.

Examples

lon <- c(-4.25181,-3.18827)
lat <- c(55.86424, 55.95325)
p <- sgo_points(list(longitude=lon, latitude=lat), epsg=4326)
# warning: a single Helmert transformation is used in the next transformation
p2 <- sgo_set_gcs(p, to=4277)
# if higher precision is required to transform between OSGB36 lon/lat and
# ETRS89/WGS84 lon/lat then use the OSTN15 transformation (will be slower):
# Transform from WGS84 lon/lat coordinates to EPSG:4277 using OSTN15
p2 <- sgo_transform(p, to=4277)

sgo documentation built on Sept. 23, 2022, 5:08 p.m.