elevation: Returns the Elevation Obtained from Open-Elevation API

elevationR Documentation

Returns the Elevation Obtained from Open-Elevation API

Description

Query https://open-elevation.com server to get elevation for a given longitude and latitude from the SRTM version 4.1 dataset at spatial resolution: 30 Arc-Seconds equivalent to 250 meters.

Usage

elevation(lng, lat, x, sp = FALSE)

Arguments

lng

Latitude. Vector of Geographic coordinates (e.g. 14.136882)

lat

Longitude. Vector of Geographic coordinates (e.g. 47.510895)

x

Object of class ⁠SpatialPointsDataFrame⁠.

sp

If ⁠TRUE⁠ return spatial object as defined in sp; needs package rgdal.

Details

Nothing here yet.

Value

A ⁠list⁠ or ⁠SpatialPointsDataFrame⁠ with CRS("+init=epsg:4326").

Author(s)

Roland Kaiser

See Also

geocode.austria

Examples

# single latitude longitude pair	
r <- elevation(lng = 13, lat = 47, sp = FALSE)
class(r)
print(r)

# latitude longitude duplet
r <- elevation(lng = c(13,14), lat = c(47,48), sp = FALSE)
class(r)
print(r)

# return SpatialPointsDataFrame
r <- elevation(lng = c(13,14), lat = c(47,48), sp = TRUE)
print(r)

# use Spatial object as argumnet 'x'
r <- elevation(x = r)
print(r)

kardinal-eros/sabotag-tools documentation built on Feb. 6, 2025, 1:12 a.m.