Description Usage Arguments Value Examples
Stitches together files into a single raster Requires a target directory of files that can be read with raster::raster(), e.g. .asc files, or a directory of .zip files containing these files
1 2 3 4 5 6 7 8 9 | mosaic_files(
path,
extract_zip = FALSE,
file_match = ".*.asc",
zip_file_match = ".*.zip",
raster_output_file = "mosaic_out.raster",
file_crs = NULL,
raster_todisk = FALSE
)
|
path |
path to files that are to be stitched together |
extract_zip |
|
file_match |
regex pattern to match .asc files, either in |
zip_file_match |
regex pattern to match .zip files |
raster_output_file |
raster file to be created (will overwrite existing files) |
file_crs |
projection string of the input files. Output will always be WGS84. |
raster_todisk |
Setting |
TRUE
1 2 3 4 5 6 7 8 9 10 11 12 | # Merges two small example .asc files of LIDAR data
# from https://environment.data.gov.uk (open government licence)
path_to_files <- system.file("extdata/example_asc", package = "geoviz")
path_to_output <- tempdir()
mosaic_files(path_to_files,
raster_output_file = paste0(path_to_output, '/mosaic_out.raster', sep = ''),
extract_zip = TRUE, file_crs = "+init=epsg:27700")
raster_mosaic <- raster::raster(paste0(path_to_output, '/mosaic_out.gri', sep = ''))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.