[gdal-dev] gdal_fillnodata does not write out nodata value to metadata

Bryan Keith bryan at ideotrope.org
Wed Apr 1 12:08:34 EDT 2009


When I run gdal_fillnodata, it fills some of my nodata spaces and doesn't
fill others because I specify -md.  However, the output file doesn't have
the nodata value written out in the metadata.  Is this the expected
behaviour?

See more details below.

Bryan

>gdalinfo -mm dem_nd.tif
Driver: GTiff/GeoTIFF
Files: dem_nd.tif
Size is 2097, 4240
Origin = (356923.827030129150000,213184.316585366210000)
Pixel Size = (9.997661921267978,-9.997661921267978)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  356923.827,  213184.317) (112d38'50.61"W, 46d 7'27.87"N)
Lower Left  (  356923.827,  170794.230) (112d37'31.81"W, 45d44'35.42"N)
Upper Right (  377888.924,  213184.317) (112d22'34.28"W, 46d 7'53.99"N)
Lower Right (  377888.924,  170794.230) (112d21'22.25"W, 45d45'1.36"N)
Center      (  367406.376,  191989.273) (112d30'4.64"W, 45d56'14.94"N)
Band 1 Block=2097x1 Type=Float32, ColorInterp=Gray
    Computed Min/Max=1431.040,3083.580
  NoData Value=-32766

>gdal_fillnodata -md 2 dem_nd.tif dem_temp.tif

>gdalinfo -mm dem_temp.tif
Driver: GTiff/GeoTIFF
Files: dem_temp.tif
Size is 2097, 4240
Origin = (356923.827030129150000,213184.316585366210000)
Pixel Size = (9.997661921267978,-9.997661921267978)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  356923.827,  213184.317) (112d38'50.61"W, 46d 7'27.87"N)
Lower Left  (  356923.827,  170794.230) (112d37'31.81"W, 45d44'35.42"N)
Upper Right (  377888.924,  213184.317) (112d22'34.28"W, 46d 7'53.99"N)
Lower Right (  377888.924,  170794.230) (112d21'22.25"W, 45d45'1.36"N)
Center      (  367406.376,  191989.273) (112d30'4.64"W, 45d56'14.94"N)
Band 1 Block=2097x1 Type=Float32, ColorInterp=Gray
    Computed Min/Max=-32766.000,3083.580

so I have to fix it like this:

>gdal_translate -a_nodata -32766 dem_temp.tif dem.tif





More information about the gdal-dev mailing list