R语言geoviz包,mosaic_files#拼接光栅文件
Tue Mar 16 13:49:05 2021 -
字符编码:UTF-8
R 版本:R x64 4.0.4 for window 10
cgh163email@163.com
个人笔记不负责任,拎了个梨🍐
.rs.restartR()
require(geoviz)
rm(list = ls());gc()
?mosaic_files#拼接光栅文件。将文件缝合到一个光栅中需要一个目标目录,其中包含可以用raster::raster()读取的文件,例如.asc文件,或包含这些文件的.zip文件目录
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 = ''))
plot(raster_mosaic)