[Gdal-dev] ERDAS/IMG driver error for NULL values

Otto Dassau otto.dassau at gmx.de
Wed Jun 30 04:35:04 EDT 2004


Hi, 

Sorry for using the mailing list for this bug report, but bugzilla currently doesn't work:  

I have problems exporting images into ERDAS Format from GRASS GIS using r.out.gdal and r.in.gdal. I use a current GDAL CVS snapshot together with GRASS GIS. 

BUG:
- exporting GRASS Raster file into ERDAS/IMG and reimporting into GRASS GIS again all NULL values change to value 32. I tried the same with GeoTiff Format and there it works without problems: Null is NULL again. So this works for GeoTiff but not for ERDAS/IMG and might be a problem of the ERDAS/IMG driver, I guess.

WISH:
apart from that I also have a two general wishes: 

a)general color table support for images more than 8bit. Colortable is broken for 16bit images. 

b)displaying coordinate system infos in gdalinfo would be very nice, too. 

### some information using gdalinfo on the exported files (ERDAS/IMG and ### GeoTiff 

gdalinfo -mm bor_halo_100604.img
> Driver: HFA/Erdas Imagine Images (.img)
> Size is 12333, 10083
> Coordinate System is:
> LOCAL_CS["Unknown",
>     UNIT["meters",1]]
> Origin = (3347187.000000,5944962.000000)
> Pixel Size = (0.60000000,-0.60000000)
> Corner Coordinates:
> Upper Left  ( 3347187.000, 5944962.000)
> Lower Left  ( 3347187.000, 5938912.200)
> Upper Right ( 3354586.800, 5944962.000)
> Lower Right ( 3354586.800, 5938912.200)
> Center      ( 3350886.900, 5941937.100)
> Band 1 Block=64x64 Type=UInt16, ColorInterp=Undefined
>     Computed Min/Max=32.000,351.000
> Metadata:
>   COLOR_TABLE_RULES_COUNT=0

Importing the ERDAS file to GRASS again with r.in.gdal all NULL values get the value 32 and the colortable is broken, too - probably because 
16bit is not implemented (only 8bit) yet, isn't it?

Also there is no coordinate system specified. This should be:  

> name: Transverse Mercator
> datum: potsdam
> towgs84: 590.5,69.5,411.6,-0.796,-0.052,-3.601,8.30
> proj: tmerc
> ellps: bessel
> a: 6377397.1550000003
> es: 0.0066743722
> f: 299.1528128000
> lat_0: 0.0000000000
> lon_0: 9.0000000000
> k_0: 1.0000000000
> x_0: 3500000.0000000000
> y_0: 0.0000000000


I tried the same with GeoTiff:

gdalinfo -mm bor_halo60f53_100604.tiff
> Driver: GTiff/GeoTIFF
> Size is 12333, 10083
> Coordinate System is `'
> Origin = (3347187.000000,5944962.000000)
> Pixel Size = (0.60000000,-0.60000000)
> Corner Coordinates:
> Upper Left  ( 3347187.000, 5944962.000)
> Lower Left  ( 3347187.000, 5938912.200)
> Upper Right ( 3354586.800, 5944962.000)
> Lower Right ( 3354586.800, 5938912.200)
> Center      ( 3350886.900, 5941937.100)
> Band 1 Block=12333x1 Type=UInt16, ColorInterp=Gray
>     Computed Min/Max=32.000,351.000
>   NoData Value=0
> 
> -> Farben natuerlich auch nicht dabei:
> r.in.gdal -oe in=bor_halo60f53_100604.tiff out=muell2
> CREATING SUPPORT FILES FOR muell2
> SETTING GREY COLOR TABLE FOR muell2 (16bit, image range)


I hope this can be fixed. 

thanks a lot
  Otto







More information about the Gdal-dev mailing list