Description Usage Arguments Examples
Modfied from https://www.r-bloggers.com/great-circle-distance-calculations-in-r/ https://rdrr.io/cran/prettymapr/src/R/scalebar.R epsg = 4326 decimal degree several functions to convert lat long to meters, projected to lat long
1 | tolatlon(x, y, epsg)
|
lat1 |
Latitute for location 1 |
lon1 |
Longitude for location 2 |
lat2 |
Latitute for location 1 |
lon2 |
Longitude for location 2 |
1 2 3 4 | latlon2meter(lat1 = 45, lon1 = -90, lat2 = 34.5, lon2 = -125.5) # USA map with projection
.geodist(x1 = 34.1, y1 = 45, x2 = 34.5, y2 = 45.5, epsg = 4326)
bx <- bbox(us.states)
latlon2meter(lat1 = bx[2,1], lon1 = bx[1,1], lat2 = bx[2,2], lon2 = bx[1,1])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.