geoXY: Geodetic coordinates from latitude and longitude

Description Usage Arguments Details Value References See Also Examples

Description

Given a set of points on the earth's surface, in latitude and longitude form, this function returns the corresponding coordinates in X (east-west) and Y (north-south) distances along the surface of the earth, from a specified origin.

Usage

1
geoXY(latitude, longitude, lat0, lon0, unit = 1)

Arguments

latitude, longitude

Pairs of latitude and longitude values for the points to be used.

lat0, lon0

The two latitude, longitude defining the origin for the desired coordinates. By default, the southwest corner of the data; that is, the minimum values for the supplied latitude and longitude coordinates.

unit

The unit to be used for the coordinates, in meters; e.g., unit=1000 causes the coordinates to be in kilometers.

Details

The coordinates returned are an alternative to projecting the points onto a plane or other surface. Unlike projections, there is no distortion or approximation involved, other than computational error in the algorithm for geodetic distances. The coordinates are in principle exact replications of the latitude and longitude, but expressed in distances along the corresponding horizontal and vertical geodesics. Essentially, the coordinates are rotated to a parallel of latitude and a north-south meridian through the origin, and distances returned along those lines to the latitude and longitude of the data points. For purposes of data visualization, the advantage is that the points are suitable for plotting as x, y values directly, regardless of the location, so long as the range of the latitude is not large compared to the surface of the earth.

The specific computation can be imagined as follows. For each pair of latitude and longitude in the data, the corresponding x coordinate is the distance from the origin to a point that has the same latitude as the origin and the same longitude as the data. The y coordinate is the distance from the origin to a point with the same longitude as the origin and the same latitude as the data. In each case the distance is distance on the surface of the earth, as computed by the algorithm in geoDist, with a sign given by the corresponding difference in latitude (for the y coordinate) or longitude (for the x coordinate).

Value

A two-column matrix of coordinates, with column names "X", "Y".

References

Vincenty,T. (1975). Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations. Survey Review, vol. 23(176):88-94.

See Also

geoDist, which computes the distances.

Examples

1
2
xy <- geoXY(gpsObject1@latitude, gpsObject1@longitude, unit = 1000)
plot(xy[,1], xy[,2], asp = 1)

SoDA documentation built on Oct. 28, 2020, 9:07 a.m.