Commit 929c2d1e authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed inconsistency in 'data ignore value' metadata key that may cause duplicates in ENVI headers.

Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <>
parent b94a9326
......@@ -380,7 +380,7 @@ class GeoArray(object):
self._nodata = value
if self._metadata and value is not None:
self.metadata.global_meta.update({'data ignore value': str(value)})
self.metadata.global_meta.update({'data_ignore_value': str(value)})
def mask_nodata(self):
......@@ -1068,9 +1068,9 @@ class GeoArray(object):
if 'nodata' in envi_metadict:
del envi_metadict['nodata']
# set data ignore value in case self.metadata.band_meta contains a unique nodata value
# set data_ignore_value in case self.metadata.band_meta contains a unique nodata value
if 'nodata' in self.metadata.band_meta and len(set(self.metadata.band_meta['nodata'])) == 1:
envi_metadict['data ignore value'] = str(self.metadata.band_meta['nodata'][0])
envi_metadict['data_ignore_value'] = str(self.metadata.band_meta['nodata'][0])
ds_out.SetMetadata(envi_metadict, 'ENVI')
......@@ -60,7 +60,7 @@ class GDAL_Metadata(object):
if nodata_allbands is not None:
self.global_meta.update({'data ignore value': str(nodata_allbands)})
self.global_meta.update({'data_ignore_value': str(nodata_allbands)})
def from_file(cls, filePath):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment