elevation: Returns the Elevation Obtained from Open-Elevation API

Description Usage Arguments Details Value Author(s) See Also Examples

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# 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 May 20, 2019, 7:21 a.m.