Commit 209ca2f2 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Bugfix

io.raster.GeoArray.GeoArray:
- save(): fix for trying to write NaN metadata values

- updated __version__
parent c3a547df
......@@ -15,7 +15,7 @@ __all__=[#'compatibility',
'similarity',
'GeoArray']
__version__ = '20170223_02'
__version__ = '20170306_01'
__author__='Daniel Scheffler'
# Validate GDAL version
......
......@@ -810,7 +810,9 @@ class GeoArray(object):
if not self.metadata.empty:
for bidx in range(self.bands):
band = ds.GetRasterBand(bidx+1)
band.SetMetadata(self.metadata[bidx].to_dict())
meta2write = self.metadata[bidx].to_dict()
meta2write = dict((k, v) for k, v in meta2write.items() if not v is np.nan)
band.SetMetadata(meta2write)
band = None
driver.CreateCopy(out_path, ds, options=creationOptions if creationOptions else [])
......
Markdown is supported
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