coords_to_km: Geographic coordinates to kilometers coordinates

Description Usage Arguments Value Examples

Description

Transform geographic coordinates into a distance based coordinates. The function is based on the Haversine formula.

Usage

1
coords_to_km(lon, lat, lon0, lat0)

Arguments

lon

longitude vector in degrees

lat

latitude vector in degrees

lon0

longitude of the centroid of the survey area

lat0

latittude of the centroid of the survey area

Value

Return a data frame holding the new coordinates

Examples

1
2
3
4
deg.grid <- expand.grid(x=seq(40,50,by=2.5), y=seq(60,70,by=2.5))
km_.grid <- coords_to_km(lon=deg.grid$x, lat=deg.grid$y, lon0=mean(deg.grid$x), lat0=mean(deg.grid$y))
plot(km.grid)
#END

RoyChristian/startR documentation built on May 9, 2019, 10:34 a.m.