[gdal-dev] gdal_create: input file option
Rahkonen Jukka (MML)
jukka.rahkonen at maanmittauslaitos.fi
Tue Dec 1 05:23:58 PST 2020
Hi,
Every now and then people would like to rasterize vectors into raster that matches exactly with some existing raster. There are a few possible ways for creating an empty copy from a raster with GDAL tools https://gis.stackexchange.com/questions/220753/how-do-i-create-blank-geotiff-with-same-spatial-properties-as-existing-geotiff . The gdal_merge way with -createonly does the job and is fast, but who remembers that gdal_merge exists and can be used for such purpose? How about to add an option like "-if" (input file) into gdal_create program, with the same effect? Options -outsize, -a_srs, -a_ullr would have no effect if used together with input template file. Options -of, -bands, -ot, -a_nodata, -co could override if given. Not sure about metadata, but probably it is never worth copying from the template file.
-Jukka Rahkonen-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20201201/7d5d779e/attachment.html>
More information about the gdal-dev
mailing list