Learn R Programming

geoviz (version 0.2.2)

mapzen_dem: Gets Digital Elevation Model (DEM) data from 'mapzen' via 'Amazon Public Datasets'

Description

Gets Digital Elevation Model (DEM) data from 'mapzen' via 'Amazon Public Datasets'

Usage

mapzen_dem(lat, long, square_km, width_buffer = 1, max_tiles = 10)

Arguments

lat

WGS84 latitude. Either a single point to use as the centre for a square_km sized raster, or a vector of track points

long

WGS84 longitude. Either a single point to use as the centre for a square_km sized raster, or a vector of track points

square_km

length of one edge the required square area, in km. Ignored if lat and long have length > 1

width_buffer

If lat and long have length > 1, used as buffer distance around the provided points in km

max_tiles

maximum number of map tiles to request. More tiles will give higher resolution scenes but take longer to download. Note that very small numbers of tiles may result in a scene that is not square.

Value

a raster with values corresponding to terrain height in metres

Examples

Run this code
# NOT RUN {
lat = 54.4502651
long = -3.1767946
square_km = 2

dem <- mapzen_dem(lat, long, square_km, max_tiles = 2)
# }

Run the code above in your browser using DataLab