Skip to contents

Terrain of the Czech Republic as a terra package object.

Usage

vyskopis(format = "rayshaded", cropped = TRUE)

Source

Copernicus Land Monitoring service, with funding by the European Union. https://land.copernicus.eu/en/products/products-that-are-no-longer-disseminated-on-the-clms-website

Arguments

format

Should the function return actual terrain (meters above sea level) or shaded relief (rayshaded). Allowed values are "actual" and "rayshaded".

cropped

Should the raster provide data over Czech Republic's bounding box (cropped = FALSE) or just actual borders (cropped = TRUE). Defaults to TRUE to preserve compatibility with earlier versions.

Value

terra package SpatRaster

Details

The function returns a raster file of either actual terrain (values are meters above sea level) or rayshaded relief.

The raster is created from EU DEM 1.1 file by Copernicus Land Monitoring service. The original file has pixel resolution 25×25 meters, which is too detailed for purposes of the package and was downsampled by factor of 4.

The extent of the raster file is bounding box of the Czech Republic; this is a change to prior versions in order to better facilitate use of the raster in natural sciences context. To preserve compatibility optional argument cropped has been created, defaulting to TRUE (i.e. behavior before v1.10.0).

Due to package size constraints both versions are stored externally (and a working internet connection is required to use the package).

The data is current to year 2011 (but it is not expected to materially change over time). Downloaded size of the rasters is 70 MB, so proceed with caution.

Examples

# \donttest{
library(terra)
#> terra 1.7.83

# original extent - bounding box over Czech Republic
original_extent <- vyskopis("rayshaded", cropped = FALSE)
#> RCzechia: using dataset stored locally in ~/.rczechia

plot(original_extent, col = gray.colors(16))

# add plot of country borders, for context
plot(RCzechia::republika(),
     border = "red",
     col = NA,
     add = TRUE)
#> RCzechia: using dataset stored locally in ~/.rczechia


# cropped to size - default behaviour
cropped_extent <- vyskopis("rayshaded")
#> RCzechia: using dataset stored locally in ~/.rczechia

plot(cropped_extent, col = gray.colors(16))


# }