The function apply gdalwarp to build rasters with the same projection, resolution and grid alignment of another raster. If not specified, the output format of each file is the same of the corresponding source file.
gdalwarp_grid(srcfiles, dstfiles, ref, of = NULL, ...)
srcfiles | A vector of input file paths (managed by GDAL). |
---|---|
dstfiles | A vector of input file paths. |
ref | Path of the raster taken as reference. |
of | The output format (use the short format name). Default is the format of every input filename. |
... | Additional parameters of gdalwarp (different from |
License: GPL 3.0
# NOT RUN { ex_sel <- c("/path/of/existing/input/file.tif", "/path/of/existing/input/anotherfile.jp2") ex_ref <- "/path/of/the/reference/file.jp2" ex_out <- c("/path/of/the/output/file.tif", "/path/of/the/output/anotherfile.jp2") gdalwarp_grid(ex_sel, ex_out, ex_ref, dstnodata=0, overwrite=TRUE) # }