Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#4152 closed defect (fixed)

Saga binary grid driver seems to ignore specified nodata values

Reported by: Alister Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: 1.8.0
Severity: normal Keywords: sdat sgrd SAGA
Cc: vwichmann

Description

I am on Windows (OWGeo4W).

When I create a Saga binary grid using the gdal command line tools (e.g. gdalwarp and gdal_translate), the -a_nodata option is ignored. It seems like there are default nodata values which are always used for a given band data type.

e.g. when creating an Int16 grid, the nodata value is always set to -32767, which is particularly strange when I am creating it by translating from a file with a nodata value of -32768, as the values in the image stay at -32768, but the nodata value is set to -32767 ;) When creating a UInt16 grid, the nodata value is always set to 65535.

Is there something I'm missing here? Does Saga binary grid (or its gdal driver) not support nodata values? If so, shouldn't there be a warning message or something?

Thanks.

Change History (5)

comment:1 by warmerdam, 13 years ago

Cc: vwichmann added
Component: defaultGDAL_Raster
Keywords: SAGA added

cc:ing Volker. If the driver does not natively support nodata then it likely ought to let it be handled via PAM mechanisms.

comment:2 by vwichmann, 13 years ago

Yes, at the moment the GDAL dataformat (GDT) is used to map to SAGA's NoData values. This is hardcoded in sagadataset.cpp (NoData definition is line 44ff, Mapping is done in line 82ff).

I need to have a more detailed look on how the NoData handling has to be changed within the driver. Suggestions welcome (e.g. which mechanism is preferred, how is NoData handling is supported by other drivers etc).

Volker

comment:3 by Even Rouault, 13 years ago

Fixed in trunk (r22676) and in branches/1.8 (r22677)

comment:4 by Even Rouault, 13 years ago

Milestone: 1.8.2
Resolution: fixed
Status: newclosed

comment:5 by Even Rouault, 11 years ago

Milestone: 1.8.2

Milestone 1.8.2 deleted

Note: See TracTickets for help on using tickets.