[Gdal-dev] trouble with "gdal_translate -a_nodata" for Erdas Imagine output

Mark Phillips mbp at geomtech.com
Mon Jul 16 12:23:16 EDT 2007


Hi.  I'm using FWTools-1.3.4 on Linux, and I'm having trouble adding a
NoData file to an Erdas Imagine file with gdal_translate.  It works
fine for GeoTiff.  Am I doing something wrong?  Does Erdas Imagine
support NoData values?  Here's a session showing what I'm doing:

> mbp at laurel:~/LIDAR$ gdalinfo src.img
> Driver: HFA/Erdas Imagine Images (.img)
> Files: src.img
> Size is 1500, 1500
> ...
> Band 1 Block=64x64 Type=Float32, ColorInterp=Undefined
>   Description = Layer_1
>   Metadata:
>     LAYER_TYPE=athematic
>
> mbp at laurel:~/LIDAR$ gdal_translate -a_nodata -9999 -of HFA src.img dst.img
> Input file size is 1500, 1500
> 0...10...20...30...40...50...60...70...80...90...100 - done.
>
> mbp at laurel:~/LIDAR$ gdalinfo dst.img
> Driver: HFA/Erdas Imagine Images (.img)
> Files: dst.img
> Size is 1500, 1500
> ...
> Band 1 Block=64x64 Type=Float32, ColorInterp=Undefined
>   Description = Layer_1
>   Metadata:
>     LAYER_TYPE=athematic
>
> mbp at laurel:~/LIDAR$ gdal_translate -a_nodata -9999 src.img dst.tif
> Input file size is 1500, 1500
> 0...10...20...30...40...50...60...70...80...90...100 - done.
> mbp at laurel:~/LIDAR$ gdalinfo dst.tif
> Driver: GTiff/GeoTIFF
> Files: dst.tif
> Size is 1500, 1500
> ...
> Band 1 Block=1500x1 Type=Float32, ColorInterp=Gray
>   NoData Value=-9999
>   Metadata:
>     LAYER_TYPE=athematic

Thanks in advance,

--Mark


-- 
Mark Phillips
Geometry Technologies LLC
mbp at geomtech.com
828-628-0489



More information about the Gdal-dev mailing list