[FWTools] Gdaltranslate ESRI grid to GeoTIFF: pixel values are blown up.

Bryan Keith bryan at geomega.com
Wed Oct 4 10:12:14 EDT 2006


Frank knows about a gdal bug working with floating point no data values. 
  He asked me to write up a bug in bugzilla, but I haven't got around to 
it yet (poor excuse).  It has to do with comparing (and casting?) 
floating point no data values with the raster values.  You can read more 



Frans Knibbe wrote:
> Hello list,
> Frank has had a look at the sample data now. The conclusions are that 
> gdaltranslate did not actually blow up the pixel values. It produces a 
> TIFF file that is almost the same as a TIFF file produced by ArcMap, 
> only it does not produce an associated *.aux file. ArcMap uses 
> information from this *.aux file to get the minimum and maximum pixel 
> values. If I delete the aux file, ArcMap reports the same minimum and 
> maximum values for both TIFFs (ArcMap-produced and 
> gdal_translate-produced) . Both those values are wrong. The nodata value 
> is -3,4E38. The information that -3,4E38 is the nodata value gets lost 
> somehow when translation to TIFF is done. So the TIFF has pixel values 
> between the real minimum and maximum ( -6.96 and 30.5 for example), plus 
> some pixels with value -3,4E38.
> I was misled by ArcMap not showing the right information for TIFF files 
> that doe not have an *.aux file. I will now further investigate the 
> problem of drawing the TIFFs in mapserver.
> Greetings,
> Frans
> Frank Warmerdam wrote:
>> Frans Knibbe wrote:
>>> Hello,
>>> I am trying to prepare elevation grids for display and query with the 
>>> UMN MapServer. The source data are ESRI floating point grids. As I 
>>> understand geoTIFF to be a good format to use with MapServer I use 
>>> gdaltranslate (from FWTools 1.0.5) to convert the grids to geoTIFFs. 
>>> The problem is that in the resulting geoTIFF images the pixel values 
>>> are somehow blown up. Gdalinfo does not report the minimum and 
>>> maximum values of the GeoTIFFs, but opening a file in ArcMAP reveals 
>>> the minimum value to be 1.17E-38 and the maximum value to be 3.4E38, 
>>> when the original values were -6.96 and 30.5.
>>> When I use ArcMap to convert the grids to TIFF, the pixel values do 
>>> seem correct, but somehow those TIFFs are not drawn by MapServer. 
>>> MapServer does draw the files made by gldaltranslate. Can anyone help 
>>> me with getting the pixel values right?
>> Frans,
>> If you could create a small arcinfo grid, and convert it to geotiff both
>> ways, and then send me the two outputs and the input all zipped up I can
>> try to analyse the difference.
>> I vaguely suspect the problem is that ArcMap isn't getting min/max 
>> metadata
>> value from the GDAL produced GeoTIFF and that is resulting in default
>> scaling.  But it is hard to be sure.
>> It would be best to submit this as a bug report against GDAL in the GDAL
>> bugzilla.
>> Best regards,
> _______________________________________________
> FWTools mailing list
> FWTools at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/fwtools
> http://fwtools.maptools.org/

More information about the FWTools mailing list