[gdal-dev] GDAL Erdas LAN/GIS driver

Roger Bivand Roger.Bivand at nhh.no
Thu Aug 27 11:13:58 EDT 2009

On Mon, 24 Aug 2009, Frank Warmerdam wrote:

> Roger Bivand wrote:
>> (reverting to list)
>> Correction, the user reported that:
>>> Apparently, gdalinfo retrieves the correct min, max, and statistics, 
>>> despite the use of GDT_Int16.
>> on his Windows platform. The different GDAL versions ought to explain why 
>> his gdalinfo says Int16 but gives statistics from UInt16.
> ...
>> On the trunk, GDT_Int16 is used too, so how does gdalinfo detect that it is 
>> actually UInt16?
> Roger,
> I believe the min/max is actually being read from the file header in trunk
> and is handled without regard to the actual imagery or it's type.
> I skimmed the changelog for this driver and I didn't notice any obvious
> changes in metadata / statistics handling so I'm surprised at this result.
> Best regards,


Having at last got the data and a current 1.7.0dev, I have to report that 
on x86 Linux, I cannot reproduce the reading of Int16 as UInt16 reported 
by the original questioner - I get Int16 and a negative minimum with 
gdalinfo, and in rgdal using the same *.so. How the difference arose is 
unclear, I can download FWTools and check on Windows.

I would argue for replacing Int16 by UInt16 in the LAN/GIS driver based on 
PCI and ESRI references to the data types as unsigned, but am open to 
other arguments.

Best wishes,


Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no

More information about the gdal-dev mailing list