Skip to contents

Get a DEM raster for a country based on ISO3 code

Usage

getDEM(polygon, ISO3 = "AUT", clip = TRUE)

Arguments

polygon

A Spatial / SimpleFeature Polygon to crop the DEM

ISO3

The ISO3 code of the country

clip

boolean, indicating if polygon should be cropped. Default is TRUE

Value

A list with the DEM raster, and a Simple Feature Polygon or NULL if no polygon is given

See also

Examples

if (FALSE) {
library(sf)
library(raster)
Polygon1 <- sf::st_as_sf(sf::st_sfc(
  sf::st_polygon(list(cbind(
    c(4496482, 4496482, 4499991, 4499991, 4496482),
    c(2666272, 2669343, 2669343, 2666272, 2666272)))),
  crs = 3035
))
DEM_meter <- getDEM(Polygon1)
plot(DEM_meter[[1]])
plot(DEM_meter[[2]], add=TRUE)
}