Maps the 17 LCZ classes to their physical parameters (Stewart and Oke, 2012),
returning either an sf polygon layer, a raster stack or a list of rasters.
Usage
lcz_get_parameters(
x,
iselect = NULL,
istack = TRUE,
ishp = FALSE,
isave = FALSE,
lang = "en"
)Arguments
- x
A
SpatRaster(or path) with LCZ classes (1-17). It can be obtained withlcz_get_map(),lcz_get_map_euro()orlcz_get_map_usa().- iselect
Character vector with the parameter(s) to return, e.g.
"SVFmean". When supplied, only the selected layers are returned, independently ofistack.- istack
Logical. If
TRUE(default), return all parameters as a raster stack.- ishp
Logical. If
TRUE, return all parameters as ansfpolygon layer. Takes precedence overistackandiselect.- isave
Logical. Save the result in
LCZ4r_output/.- lang
Language used for console messages, errors and plot labels. See
lcz_langs(). Defaults to"en".
Value
Depending on the arguments: an sf object (ishp = TRUE), a
SpatRaster stack (istack = TRUE or iselect), or a list of
SpatRaster layers (istack = FALSE).
References
Stewart, I. D., and Oke, T. R. (2012). Local Climate Zones for urban temperature studies. Bull. Amer. Meteor. Soc. 93(12) 1879-1900. doi:10.1175/BAMS-D-11-00019.1
Examples
if (FALSE) { # \dontrun{
lcz_map <- lcz_get_map(city = "Juiz de Fora")
# Full stack (34 layers)
lcz_params <- lcz_get_parameters(lcz_map, istack = TRUE)
# Only the parameters you need (faster and lighter)
lcz_params <- lcz_get_parameters(lcz_map, iselect = c("SVFmean", "AHmean"))
# Polygons
lcz_poly <- lcz_get_parameters(lcz_map, ishp = TRUE)
} # }
