geod.xy {oce} | R Documentation |
Convert lat/lon to x/y on earth
geod.xy(lat, lon, lat.ref, lon.ref, rotate=0)
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. |
This is based on the same geodesic calculations used in
geod.dist
, the documentation of which explains the
method and provides literature citations.
Data frame of x
and y
, measured in metres.
Dan Kelley
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')