[gdal-dev] gdal_merge.py outputs bad geotiff?

Frank Warmerdam warmerdam at pobox.com
Mon Oct 27 09:52:01 EDT 2008


Andrew Brooks wrote:
> On Fri, 24 Oct 2008 19:21:22 +0100, Even Rouault <even.rouault at mines-paris.org> wrote:
> 
>> my guess is that your merged1.tif TIFF has areas which are not initialized
>> (black/transparent areas). gdal_merge.py probably doesn't write any data in
>> them, thus leading to missing blocks in the file.
> 
> Thanks for the reply, that certainly seems to be the explanation.  It does
> raise further questions though.
> 
> 1. Should the gdal utilities' output be consistent with each other?

Andrew,

I don't see this as an inconsistency.

> 2. Should the default output format be the most compatible?

Yes, within reason it likely ought to be.

> 3. Should there be an option to turn on/off the writing of sparse files?

Yes, likely.  In fact it wouldn't so much be an option to turn sparse writing
on/off as it would be an option to push out zeroed blocks for all missing
blocks when a file is closed.

Feel free to file a ticket on this, and I'll try to fix it fairly soon.  The
default should presumably be to produce maximally compatible files even though
I wish the rest of the world would support sparse files in a sensible way.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list