Access digital elevation model (DEM) for a given region
Usage
get_dem(
aoi,
osm,
dem_source = "STAC",
stac_endpoint = NULL,
stac_collection = NULL,
force_download = FALSE
)Arguments
- aoi
A list of delineation parameters, including
$dem_bufferused to expand the area of interest covered by the network and$crsfor the CRS which to transform the DEM to- osm
A list with OpenStreetMap data sets for the a location, as objects of class
sf::sfc- dem_source
Source of the DEM:
If "STAC" (default), DEM tiles are searched on a SpatioTemporal Asset Catalog (STAC) end point, then accessed and mosaicked to the area of interest
- stac_endpoint
URL of the STAC API endpoint (only used if
dem_sourceis"STAC"). For more info, seeget_stac_asset_urls()- stac_collection
Identifier of the STAC collection to be queried (only used if
dem_sourceis"STAC"). For more info, seeget_stac_asset_urls()- force_download
Download data even if cached data is available
Examples
if (FALSE) { # interactive()
# Define delineation parameters and get OSM data within area of interest
aoi <- define_aoi("Bucharest", "Dâmbovița")
osm <- get_osm(aoi)
# Get DEM with default values
dem <- get_dem(aoi, osm)
# Get DEM from custom STAC endpoint
get_dem(aoi, osm,
stac_endpoint = "some endpoint",
stac_collection = "some collection")
# Specify CRS
get_dem(bb, crs = crs)
}