This function uses the AWS Terrain Tile service to retrieve an elevation
raster from the geotiff service. It accepts a sp::bbox
object as
input and returns a single raster object covering that extent.
get_aws_terrain(
locations,
z,
prj,
expand = NULL,
ncpu = future::availableCores() - 1,
serial = NULL,
...
)
The zoom level to return. The zoom ranges from 1 to 14. Resolution of the resultant raster is determined by the zoom and latitude. For details on zoom and resolution see the documentation from Mapzen at https://github.com/tilezen/joerd/blob/master/docs/data-sources.md#what-is-the-ground-resolution
A string defining the projection of the locations argument. The
string needs to be an acceptable SRS_string for
CRS-class
for your version of PROJ. If a sf
object, a sp
object or a raster
object
is provided, the string will be taken from that. This
argument is required for a data.frame
of locations.
A numeric value of a distance, in map units, used to expand the bounding box that is used to fetch the terrain tiles. This can be used for features that fall close to the edge of a tile and additional area around the feature is desired. Default is NULL.
Number of CPU's to use when downloading aws tiles.
Logical to determine if API should be hit in serial or in parallel. TRUE will use purrr, FALSE will use furrr.
Extra configuration parameters to be passed to httr::GET. Common
usage is to adjust timeout. This is done as
config=timeout(x)
where x
is a numeric value in
seconds. Multiple configuration functions may be passed as a
vector.
a sp::bbox
object that is used to select x,y,z tiles.