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-
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
