Skip to contents

MapProject: forward projections of Snyder (1987) - spherical sinu, moll, eck4, goode (PROJ constants), wintri (Winkel's standard parallel acos(2/pi)), bonne, cass, aeqd, stere; ellipsoidal WGS84 merc, lcc, aea, tmerc (Krueger series to order 6; Karney 2011) and utm - with longitude differences wrapped as PROJ. UtmZone: zone with the Norway and Svalbard exceptions. GeodeticToEnu: ECEF and local east-north-up coordinates. GreatCircleDistance and VincentyInverse (Vincenty 1975). Identical to the Python arm morie.fn.mapproj.

Usage

MapProject(
  lon,
  lat,
  proj,
  R = 6371000,
  lon_0 = 0,
  lat_0 = 0,
  lat_1 = NULL,
  lat_2 = NULL,
  k_0 = 1,
  zone = NULL,
  south = FALSE
)

UtmZone(lon, lat)

GeodeticToEnu(lon, lat, h, lon0, lat0, h0)

GreatCircleDistance(lon1, lat1, lon2, lat2, r = 6378137)

VincentyInverse(lon1, lat1, lon2, lat2, tol = 1e-13, maxit = 200L)

Arguments

lon, lat

Degrees.

proj

Projection name.

R

Sphere radius.

lon_0, lat_0

Projection centre.

lat_1, lat_2

Standard parallels.

k_0

Scale factor.

zone

UTM zone.

south

Southern hemisphere UTM.

h

Ellipsoidal height.

lon0, lat0, h0

Local origin.

lon1, lat1, lon2, lat2

Endpoints.

r

Radius for the haversine distance.

tol

Convergence tolerance.

maxit

Maximum iterations.

Value

Coordinates, zone, distance or list.

References

Snyder, J. P. (1987). Map Projections: A Working Manual. U.S. Geological Survey Professional Paper 1395.

Karney, C. F. F. (2011). Transverse Mercator with an accuracy of a few nanometers. Journal of Geodesy 85, 475-485.

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

Examples

MapProject(10, 50, "sinu")
#> [1]  714747.2 5559746.3
UtmZone(10, 50)
#> [1] 32
VincentyInverse(0, 0, 1, 0)$distance
#> [1] 111319.5