Opened 12 years ago

Closed 10 years ago

#3057 closed enhancement (fixed)

Add ability to set NullCellValue for .ers files using ERMapper driver

Reported by: dougc Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

The .ers NullCellValue? header field can be read but not written by GDAL. Our application needed a way to set this. Since the GDAL NoDataValue? methods are implemented per band and not by the driver, it seems like a driver option might be a good way to enable this capability. I implemented the code below in a private build and would like to suggest it for inclusion in GDAL. Based on existing .ers files written elsewhere that have NullCellValue? set, I think it's best placed in ersdata.cpp after the CellType? field written at line 1148 of rev 17119. Thanks for considering this.

/* -------------------------------------------------------------------- */
/*      Write the null cell value if supplied.                          */
/* -------------------------------------------------------------------- */
	const char * pszNullCellValue = CSLFetchNameValue( papszOptions, "NULLCELLVALUE" );
	if( pszNullCellValue )
	{
		VSIFPrintfL( fpERS, "\tNullCellValue\t= %s\n", pszNullCellValue );
	}

Change History (1)

comment:1 Changed 10 years ago by dougc

Resolution: fixed
Status: newclosed

This was resolved in 1.8.1 via #4207.

Note: See TracTickets for help on using tickets.