[gdal-dev] gdal_merge GeoTIFF output twice correct size

Nathan Vander Wilt nate-lists at calftrail.com
Thu Mar 25 18:40:33 EDT 2010


I used gdal_merge to combine four tiles into a perfectly square image. However, the resulting file was double the size on disk than I would expect based on its dimensions and bit depth. I opened it in a hex editor, and there is a huge pattern of data that repeats 0x00003075 followed by a ton of zeroes.

Why is gdal_merge writing all this extra data? Does it have something to do with the "sparse" blocks discussed in this thread?
http://lists.osgeo.org/pipermail/gdal-dev/2008-October/018750.html

I found how to perhaps compress these blocks with format options (http://gdal.org/frmt_gtiff.html) and could try that, but that may lead to compatibility issues. Why are these blocks in the file at all? Again, the merged image is square and is completely covered by the source data.

thanks,
-natevw
http://calftrail.com


More information about the gdal-dev mailing list