[Gdal-dev] wrong nodata returned in GDAL dependent software

Maciej Sieczka tutey at o2.pl
Mon Jun 25 10:39:41 EDT 2007


Hi

I'm resending my question. I guess it's got missed when GDAL list was
down for several days recently.

Maciej Sieczka wrote:

> Yet there is something else fishy -
> even when the input GRASS raster has no null, still gdal_translate
> forces a nodata, eg.:
> 
> $ r.mapcalc 'test=rand(0,1024)'
> $ r.info -r test
> min=0
> max=1023
> 
> $ r.out.gdal.sh input=test format=GTiff type=UInt16 output=test.tif
> 
> $ gdalinfo -mm test.tif | grep 'Computed\|NoData'
>     Computed Min/Max=0.000,1023.000
>   NoData Value=65535
> 
> 
> Or this one:
> 
> $ r.mapcalc 'test=rand(0,256)'
> $ r.info -r test
> min=0
> max=255
> 
> $ gdal_translate /gdata/spearfish60/sieczka/cellhd/test test.tif
> 
> $ gdalinfo -mm test.tif | grep 'Computed\|NoData'
>     Computed Min/Max=0.000,255.000
>   NoData Value=256
> 
> Is this OK? In either case I don't have any null in my input 'test'
> GRASS raster this time. Why is GDAL forcing it?

Maciek



More information about the Gdal-dev mailing list