get_epsg | R Documentation |
Get EPSG code for local UTM projection
get_epsg(x)
x |
Coordinates or spatial object |
This is a generic method to determine the EPSG code for a set of coordinates
epsg.numeric
will take a lonlat vector whereas epsg.sfc
takes an
sfc object and determines the EPSG code from the center of the bounding box.
Computation is based on a method outlined in the text Geocomputation in R,
by Robin Lovelace, section 7.3
An integer with EPSG value
get_epsg.default()
get_epsg.sfc()
get_epsg.sf()
lonlat <- c(-76.2, 33.5) # coordinates pt1 <- sf::st_point(lonlat) # sfg object pt2 <- sf::sfc(pt1) # sfc object pt2 <- sf::st_sf(pt2) # sf object get_epsg(lonlat) get_epsg(pt1) get_epsg(pt2) get_epsg(pt3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.