[Gdal-dev] floating point bug

Maciek Sieczka werchowyna at pf.pl
Tue May 11 10:32:38 EDT 2004


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.

here's the GDALINFO of the file:

Coordinate System is `'
Origin = (3617611.000000,5535259.500000)
Pixel Size = (10.00000000,-10.00000000)
Corner Coordinates:
Upper Left  ( 3617611.000, 5535259.500)
Lower Left  ( 3617611.000, 5523479.500)
Upper Right ( 3643711.000, 5535259.500)
Lower Right ( 3643711.000, 5523479.500)
Center      ( 3630661.000, 5529369.500)
Band 1 Block=2610x1 Type=Int16, ColorInterp=Undefined
    Computed Min/Max=367.000,1600.000
  NoData Value=-9999

Is it a bug?

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

my GDAL is GDAL 1.2.0.1 (dev), released 2004/03/10
(from the OpenEV_FW_linux_1.7.2.tar.gz)

Maciek




More information about the Gdal-dev mailing list