Imports raster files using a thin wrapper around terra::rast
Arguments
- x
path to the raster in a format accepted by terra::rast will work.
Details
An arbitrary crs is explicitely declared and warnings about missing extent are supressed but declared anyway.
Examples
# use a system.file to make it work here,
# otherwise just point to your file
# these two are smaller (resampled 0.5) versions of their tif counterpart
# because of data volume limitations
system.file("extdata/l1.tif", package = "mucha") %>%
import_raster() %>% p()
system.file("extdata/l2.tif", package = "mucha") %>%
import_raster() %>% p()
