Learn R Programming

weatherr (version 0.1.3)

ggele: Elevation of a set of specific locations

Description

Obtaining elevation at a set of given locations. Note that using this function you are agreeing to the Google Maps API Terms of Service at https://developers.google.com/maps/terms.

Usage

ggele(lat=0,lon=0, output=c('elevation','elevation/resolution','all'),key=NULL)

Arguments

lat, lon

numeric objects. latitude and longitude of a location in decimal degrees

output

elevation; elevation and its corresponding resolution or the original JSON output (in a list format)

key

Google API key

Value

If output="elevation", a numeric vector is returned with the elevation in metres.

If output="elevation/resolution", a data frame is return with the elevation and its corresponding resolution in metres.

If output="all", a list is returned with full JSON query output.

Examples

Run this code
# NOT RUN {
# Get the elevation of a location in Hong Kong
# }
# NOT RUN {
ggele(lat=22.39643,lon=114.1095)
# }

Run the code above in your browser using DataLab