Le mercredi 12 juin 2013 19:58:20, Graeme B. Bell a écrit :
> Also:
> 
> (using -init 255 will produce a TIFF with suitable nodata values in the
> second scenario I described, as a workaround.
> 
> However, gdal_rasterize still does not produce correct command line output
> in this situation, and also it should not be necessary for users to
> manually add a -init option and manually synchronise the value with the
> -a_nodata value to ensure valid output from gdal_rasterize)

The fact that the first example inits the output TIFF to the nodata value is 
specific to the working of the GeoTIFF driver, that returns non-instanciated 
blocks initialized to the nodata value. With other output drivers, you could 
also get a raster initialized to 0 instead of the nodata value. If you really 
want to initialize the raster with a particular value in a reliable way, 
always use -init.

I've pushed a fix in the dev version so that the progress bar appears in the 
second case (SQL with 0 resulting rows).

> 
> On Jun 12, 2013, at 7:50 PM, Graeme Bell <[email protected]> wrote:
> > Summary:
> > 
> > I noticed that gdal_rasterize invents data values instead of burning
> > nodata values, incorrectly, in what is probably a common situation - a
> > valid query returning geometry columns but zero polygon rows.
> > 
> > Command line output suggests that nothing is being done, yet a GeoTIFF
> > with data values is silently rendered in the background.
> 
> _______________________________________________
> gdal-dev mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to