[Gdal-dev] Strange GeoTIFF error/gdal_merge.py

Markus Neteler neteler at itc.it
Mon Mar 29 04:13:40 EST 2004


On Fri, Mar 26, 2004 at 12:14:12PM -0500, Frank Warmerdam wrote:
> Markus Neteler wrote:
> >On Thu, Mar 18, 2004 at 05:10:23PM -0700, Simon Perkins wrote:
> >
> >>On Thu, 2004-03-18 at 10:39, Frank Warmerdam wrote:
> >>
> >>
> >>>It had been my intention that GDAL would gracefully handle strips or
> >>>tiles that have an offset and size of zero as "auto-nodata".  Apparently
> >>>I did not complete that properly.   I will look into this.  Currently
> >>>preinitializing to zero should resolve the problem but I realize that is
> >>>not so easy to do.
> >
> >
> >Sorry to be ignorant, but how to preinitialize to zero?
> >
> >I was using:
> >
> > gdal_merge.py -f GTiff -n -9999 -o lomb20m.tif \
> >    `find /cdimage/DEM/grid | grep w001001x`
> >
> >to do the mosaiking.
> 
> Markus,
> 
> There is currently no way to pre-initialize the file with gdal_merge.py.
> 
> ... ten minutes pass ...
> 
> OK, if you update from CVS there is now a -init commandline option to
> gdal_merge.py that will write a given value to all pixels before it starts
> merging stuff in.
> 
> eg.
>   gdal_merge.py -init 0 -f GTiff -n -9999 -o lomb20m.tif \
>      `find /cdimage/DEM/grid | grep w001001x`
> 
> But there is some sort of underlying problem in the GeoTIFF driver that I
> really need to dig into.
> 
> PS. I added the Python wrapper for the Fill() method and used that.
> Thanks Simon!

Thanks for the quick implementation! The init parameter works well,
no more Tiff errors.

Thanks again,

 Markus




More information about the Gdal-dev mailing list