Get the elevation in meters for a given latitude and longitude.
Latitude/longitude must be in degrees with a geographic projection.
Usage
get_elev_from_point(lat, lon)
Arguments
- lat
The latitude to extract elevation for. Can either be a floating point value or a
vector of latitudes.
- lon
The longitude to extract elevation for. Can either be a floating point value or a
vector of latitudes.
Value
A numeric giving the elevation in meters for the input lat(s) and lon(s).
Examples
if (FALSE) {
xs <- c(-113.994, -111.032)
ys <- c(46.8721, 45.6815)
# Get elevation of Missoula and Bozeman.
elev <- get_elev_from_point(ys, xs)
}