[gdal-dev] GDAL 1.8.0 misreads images with Type=Float32 as Type=Byte

Even Rouault even.rouault at mines-paris.org
Mon Jun 27 05:38:38 EDT 2011


Selon Greg Coats <gregcoats at mac.com>:

> Even, Thanks for pointing out that this GDAL 1.8.0 bug was fixed 6 months
> ago.
> Unfortunately, GDAL 1.8.1 has not been released, no plans have been announced
> for the release of GDAL 1.8.1.

Hopefully soon.

> The predicament is that GDAL 1.8.0 must be used to use gdallocationinfo, but
> GDAL 1.7.3 (and not GDAL 1.8.0) must be used to read images with Type=Float,
> which is the type the USA government uses to distribute all digital elevation
> modes.

In the meantime, I believe you may workaround the issue by manually adding the
line PIXELTYPE F in the .hdr file. That should force the type to be recognized
as float, which can only be deduced otherwise by the .flt extension. That was
that part that was broken in 1.8.0.

> Greg
>
> On Jun 26, 2011, at 12:35 PM, Even Rouault wrote:
>
> > Le dimanche 26 juin 2011 17:02:46, Greg Coats a écrit :
> >> GDAL 1.7.3, released 2010/11/10, for Mac OS X 10.6, acquired from
> >> http://www.kyngchaos.com/software:frameworks, properly reads geo
> >> referenced raster images of Type=Float32. For the example 468 MB image,
> >> gdalinfo properly reports Type=Float32, and Computed
> >> Min/Max=35.024,748.615.
> >>
> >> GDAL 1.8.0, released 2011/01/12, for Mac OS X 10.6, acquired from
> >> http://www.kyngchaos.com/software:frameworks, improperly read geo
> >> referenced images of Type=Float32. For the example 468 MB image, gdalinfo
> >> improperly reports Type=Byte, and Computed Min/Max=0.000,255.000.
> >>
> >> gregcoats $ source ~/programs/scripts/paths_gdal_173.sh
> >> gregcoats $ gdalinfo --version
> >> GDAL 1.7.3, released 2010/11/10
> >> gregcoats $ gdalinfo -mm floatn40w078_13.flt | tail -3
> >> Band 1 Block=10812x1 Type=Float32, ColorInterp=Undefined
> >>    Computed Min/Max=35.024,748.615
> >>  NoData Value=-9999
> >>
> >> gregcoats $ source ~/programs/scripts/paths_gdal_180.sh
> >> gregcoats $ $gdalinfo --version
> >> GDAL 1.8.0, released 2011/01/12
> >> gregcoats $ gdalinfo -mm floatn40w078_13.flt | tail -3
> >> Band 1 Block=10812x1 Type=Byte, ColorInterp=Undefined
> >>    Computed Min/Max=0.000,255.000
> >>  NoData Value=-9999
> >
> > You didn't mention the driver concerned by the issue, but from the file
> > extension, it looks like its ESRI HDR. So this should be fixed in 1.8.1 by
> > http://trac.osgeo.org/gdal/ticket/3933
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>




More information about the gdal-dev mailing list