Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#5605 closed defect (fixed)

GeoTIFF TIFFTAG_GDAL_NODATA unavailable as a creation option for gdal_grid in 1.11.0

Reported by: drf5n Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: default Version: 1.11.0
Severity: normal Keywords:
Cc:

Description (last modified by drf5n)

Per http://www.gdal.org/frmt_gtiff.html there should be a creation option of TIFFTAG_GDAL_NODATA available in the GDALGeoTIFF profile of the GTIFF driver.

Something like :

  gdal_grid  -of GTiff \
    -co PROFILE=GDALGeoTIFF -co TIFFTAG_GDAL_NODATA=-9999 -nodata -9999 \
    -a invdist:power=2.0:smoothing=1.0:radius1=100:radius2=100:nodata=-9999 \
    -txe 85000 89000 -tye 894000 890000\
    -outsize 400 400 -ot Float64 -l dem dem.vrt dem.tiff

...seems like it should make a geotiff with identified nodata.

I'm using a Mac with Kyngsbourne's distribution of "GDAL 1.11.0, released 2014/04/16"

I can workaround this with:

gdal_translate -a_nodata -9999 dem.tiff dem_nd.tiff

Change History (5)

comment:1 Changed 7 years ago by drf5n

Description: modified (diff)

comment:2 Changed 7 years ago by drf5n

Description: modified (diff)

comment:3 Changed 7 years ago by drf5n

Description: modified (diff)

comment:4 Changed 7 years ago by Even Rouault

Milestone: 2.0
Resolution: fixed
Status: newclosed

Note that there's no such creation option as TIFFTAG_GDAL_NODATA=XXXX, or setting it directly as a metadata item. It must be set with the appropriate SetNoDataValue?() method of the API (and the way that command line utilities provide to set it) that serves as an abstraction to set TIFFTAG_GDAL_NODATA which is an implementation detail.

Should be fixed by trunk r27565 "gdal_grid: use nodata= parameter in the algorithm string to determine the nodata value to set on the band (#5605)"

comment:5 Changed 6 years ago by Even Rouault

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.