geod.xy {oce}R Documentation

Convert lat/lon to x/y on earth

Description

Convert lat/lon to x/y on earth

Usage

geod.xy(lat, lon, lat.ref, lon.ref, rotate=0)

Arguments

lat vector of latitudes
lon vector of longitudes
lat.ref numeric, reference latitude
lon.ref numeric, reference longitude
rotate numeric, counterclockwise angle, in degrees, by which to rotate the (x, y) coordinates about the reference point. This is useful in rotating the coordinate system to align with a coastline, a mean current, etc.

Details

This is based on the same geodesic calculations used in geod.dist, the documentation of which explains the method and provides literature citations.

Value

Data frame of x and y, measured in metres.

Author(s)

Dan Kelley

See Also

geod.dist

Examples

library(oce)
lat <- c(0, 1/60,    0, 1/60)
lon <- c(0,    0, 1/60, 1/60)
plot(geod.xy(lat, lon, 0, 0, 0) / 1852)
points(geod.xy(lat, lon, 0, 0, 1) / 1852, col='red')

[Package oce version 0.1-80 Index]