View source: R/01-core-utilities.R
| load_raster_data | R Documentation |
Universal function to load raster data from files, directories, or raster objects with comprehensive error handling and validation.
load_raster_data(
input_data,
pattern = "\\.(tif|tiff)$",
recursive = FALSE,
verbose = FALSE
)
input_data |
Character string (path to file or directory), character vector of file paths, or a SpatRaster/Raster* object |
pattern |
File pattern for directory search (default: tif files) |
recursive |
Search subdirectories recursively |
verbose |
Print progress messages |
List of terra SpatRaster objects
## Not run:
# These examples require directory structures with multiple data files
# Load from directory with error handling
rasters <- load_raster_data("/path/to/raster/files")
# Load from file list with validation
rasters <- load_raster_data(c("file1.tif", "file2.tif"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.