Skip to contents

Use this function when you already have the global (or continental) LCZ GeoTIFF on disk, e.g. after a manual download from Zenodo.

Usage

lcz_get_map2(x, city = NULL, roi = NULL, isave_map = FALSE, lang = "en")

Arguments

x

A SpatRaster (or path to a raster) with LCZ classes.

city

A character string with the name of the target area, as used by OpenStreetMap/Nominatim.

roi

Optional sf/sfc polygon used to clip the map.

isave_map

Logical. Save the clipped map as a GeoTIFF.

lang

Language used for console messages and errors. See lcz_langs(). Defaults to "en".

Value

A SpatRaster clipped to the requested area.

References

Demuzere, M., Kittner, J., Martilli, A., Mills, G., Moede, C., Stewart, I. D., van Vliet, J., and Bechtel, B. (2022). A global map of Local Climate Zones. Earth Syst. Sci. Data 14(8) 3835-3873. doi:10.5194/essd-14-3835-2022

See also

Examples

if (FALSE) { # \dontrun{
my_map <- terra::rast("lcz_filter_v3.tif")
my_lcz_country <- lcz_get_map2(my_map, city = "Lisbon")
} # }