[gdal-dev] nodata handling in gdalwarp with ArcInfo binary Grid input

Chris Toney jctoney at yahoo.com
Wed Apr 30 14:23:37 EDT 2008


Hi,
I get a pattern of internal nodata pixels after
projecting an ArcInfo binary Grid with the following
command (GDAL 1.5.1):

gdalwarp -t_srs "+proj=utm +zone=12 +datum=NAD83" -tr
30 30 -rn -srcnodata "-9999" -dstnodata "-9999" -of
HFA C:\data\fm40_A\fbfm40_1 C:\data\fbfm40_utm.img

The output file is written as 8-bit and the
destination nodata value is 0 instead of -9999. A
graphic showing the pattern of nodata is at:

http://www.spatialsimulation.org/images/gdalwarp_ArcGrid_nodata.gif

and a sample ArcInfo Grid for input is at:

http://www.spatialsimulation.org/images/fm40_A.zip

The same command using an Erdas Imagine file as input
works correctly. The output is 16-bit with -9999
nodata value, and there are no internal nodata pixels.

I can specify "-ot Int16", and the command works
correctly with ArcInfo Grid input, but I'm calling
this from an application and it would be nice to let
gdalwarp handle the data type.

Also, at GDAL 1.4.2 the command seems to work fine
with ArcInfo Grid as input,except that the output is
8-bit and the nodata value is 0. But there is no
pattern of internal nodata with GDAL 1.4.2.

Should this be considered a bug, or do I need to
handle the data type explicitly?

Thanks.

Chris Toney



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


More information about the gdal-dev mailing list