Description Usage Arguments Value Note References See Also Examples
With this function it is possible to convert from Geographic coordinate to UTM coordinate. It is also possible to convert from other coordinate reference systems by selecting their EPGS number to UTM coordinate. Review notes and references.
1 | LongLatToUTM(longlat_df, crs = 4326, units = "m", digits = 4)
|
longlat_df |
Point name, Sexagesimal longitude and latitude as dataframe. |
crs |
EPGS number of the new coordinate reference system to transform. DEFAULT: 4326 (WGS84) |
units |
Select units for UTM to work. DEFAULT: 'm' |
digits |
Number of digits the seconds are |
a list with a data.frame and leaflet map.
create data frame of epsg codes by epsg <- rgdal::make_EPSG()
https://github.com/OSGeo/PROJ & https://github.com/cran/rgdal
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Point name
Pto <- "St1"
# Longitude
g <- -71
m <- 18
s <- 44.86475
# Value in sexagesimal
sexa_long <- sexagesimal(g, m, s)
# Latitude
g1 <- -33
m1 <- 12
s1 <- 27.11457
# Value in sexagesimal
sexa_lat <- sexagesimal(g1, m1, s1)
# Longitude and Latitude as data.frame
longlat_df <- data.frame(Pto,sexa_long,sexa_lat)
value <- LongLatToUTM(longlat_df, crs = 4326, units = 'm', digits = 4)
print(value)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.