[Gdal-dev] floating point bug
Frank Warmerdam
warmerdam at pobox.com
Tue May 11 13:22:34 EDT 2004
Maciek Sieczka wrote:
> Hello
>
> Seems to me that GDAL does not fully support floating point data sets.
>
> I have a floating point DEM in an ARCgrid. I want to convert it into another
> projection with GDALWARP. It reprojects fine but the ouput GEOTiff is
> trunctated to integer. Even when -wo, -ot, -co are set to Float32 it doesn't
> help either.
>
> GDALINFO recognizes my fp ARCGrid as an Int16 while the file is fp. I'm sure
> it is because it loads perfect into Grass 5.03 using r.in.arc.
Maciek,
I find it hard to believe that GDAL's AIG driver would misreport a
floating point Arc/Info Binary Grid as Int16. If you can provide a sample
Arc/Info grid that demonstrates this problem I will investigate.
> Besides: I loaded the ARCGrid into Grass, exported into floating point ESRI
> *.bil and GDALINFO again claims it's integer. Moreover it reports false
> Min/Max. Even if integer should be 367/1600 (actually are
> 367.0/1600.235962):
>
> Driver: EHdr/ESRI .hdr Labelled
> Size is 2627, 959
> Coordinate System is `'
> Origin = (3617510.000000,5533070.000000)
> Pixel Size = (10.00000000,-10.00000000)
> Corner Coordinates:
> Upper Left ( 3617510.000, 5533070.000)
> Lower Left ( 3617510.000, 5523480.000)
> Upper Right ( 3643780.000, 5533070.000)
> Lower Right ( 3643780.000, 5523480.000)
> Center ( 3630645.000, 5528275.000)
> Band 1 Block=2627x1 Type=Int32, ColorInterp=Undefined
> Computed Min/Max=1141743147.000,1153959821.000
> NoData Value=0
GDAL does not support floating point ESRI bil files. I don't know what they
put in the .hdr file to indicate floating point. So the file is misused as
integer and all the values are crazy. Can you provide the .hdr file so I can
see if there are any clues it is floating point?
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