Description Usage Arguments Value Examples
Convert the coordinates of the recorded GPS data in an initial CRS to any desired CRS
1 | convert_crs(LatList, LongList, InitProj, NextProj = NULL)
|
LatList |
A vector of size n for latitudes collected from a GPS recording device |
LongList |
A vector of size n for longitudes collected from a GPS recording device |
InitProj |
A character string of initial projection arguments; the arguments must be entered exactly as in the PROJ.4 documentation |
NextProj |
(Optional) A character string of final projection arguments; the arguments must be entered exactly as in the PROJ.4 documentation (if |
convert_crs
return a list of 2 vectors of size n for the converted latitude and longitude
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | LatList <- c(45.86880,45.86887,45.86924,
45.87158,45.87014,45.86923,45.86808,
45.87177,45.87020,45.88010)
LongList <- c(7.173500,7.172540,7.171636,
7.180180,7.178070,7.177229,7.175240,
7.181409,7.179299,7.172235)
InitProj <- "+init=epsg:4326"
#converts the GPS coordinates to OSM CRS
convert_crs(LatList,LongList,InitProj)
NextProj <- "+init=epsg:4121 +proj=longlat +ellps=GRS80
+datum=GGRS87 +no_defs +towgs84=-199.87,74.79,246.62"
#converts the GPS coordinates to a selected projection
convert_crs(LatList,LongList,InitProj,NextProj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.