Ticket #3786 (new defect)

Opened 3 years ago

Last modified 3 years ago

RST driver doesn't read flag_value unless flag_def'n is set

Reported by: sjurk Owned by: warmerdam
Priority: normal Milestone: 1.8.1
Component: GDAL_Raster Version: 1.7.2
Severity: normal Keywords: IDRISI NoData
Cc: ilucena

Description

It appears that IdrisiDataset::GetNoDataValue?() does not accept the attribute "flag_value" read from the documentation (.rdc) file unless the accompanying attribute "flag_defn" is set to something else than "none". Instead, it returns the default -9999 with pbSuccess==FALSE. The attribute "flag_defn" is usually "background" or "missing data", but is not used analytically within IDRISI, and is often ignored.

I propose to read and set NoDataValue? to the value supplied in the .rdc file if this exists, regardless of whether or not flag_defn. was supplied in the .rdc fle.

This can be accomplished by: Instead of testing: if( ! EQUAL( pszFlagDefn, "none" ) ) call mCSLFetchNameValue( poGDS->papszRDC, rdcFLAG_VALUE ) in any case, and verify the returned string before setting

dfNoData = atof_nz(string).

Change History

Changed 3 years ago by rouault

  • cc ilucena added
Note: See TracTickets for help on using tickets.