Looks name up in the catalogue and reads the layer's data file
with terra. Rasters are returned as a SpatRaster, vectors as a
SpatVector. When a folder holds more than one data file, pass
file to choose; otherwise the ambiguity is reported along with
the available files.
Arguments
- name
Character; a layer
name("fab_dem") or catalogueid("elevation/fab_dem") as listed bylist_layers().- file
Optional character; a file name or regular expression selecting one file within the layer folder.
- return_path
Logical; if
TRUE, return the file path instead of reading the data. DefaultFALSE.- ...
Passed to
build_catalogue().
See also
layer_files() to see what a layer folder holds,
layer_meta() for its metadata.