Description Usage Arguments Value Examples
Transform geographic coordinates into a distance based coordinates. The function is based on the Haversine formula.
1 | coords_to_km(lon, lat, lon0, lat0)
|
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 |
Return a data frame holding the new coordinates
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.