Commit 186f1b6c authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed missing nodata value after running GeoArray.save() with ENVI output format. Bumped version.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 7f591b45
Pipeline #27296 passed with stages
in 58 minutes and 25 seconds
......@@ -2,6 +2,13 @@
History
=======
0.14.3 (07.09.2021)
-------------------
* CI now uses Mambaforge.
* Fixed missing nodata value after running GeoArray.save() with ENVI output format.
0.14.2 (09.08.2021)
-------------------
......
......@@ -1033,9 +1033,6 @@ class GeoArray(object):
#########################################
try:
# disable to write separate metadata XML files
os.environ['GDAL_PAM_ENABLED'] = 'NO'
# ENVI #
########
if fmt == 'ENVI':
......@@ -1077,9 +1074,14 @@ class GeoArray(object):
ds_out.SetDescription(envi_metadict['description'])
ds_out.FlushCache()
# gdal.Unlink(out_path + '.aux.xml')
# NOTE: In case of ENVI format and GDAL_PAM_ENABLED=NO, the metadata is not written
gdal.Unlink(out_path + '.aux.xml')
else:
# disable to write separate metadata XML files
os.environ['GDAL_PAM_ENABLED'] = 'NO'
ds_out = ds_src
# set metadata
......
......@@ -20,5 +20,5 @@
# with this program. If not, see <http://www.gnu.org/licenses/>.
__version__ = '0.14.2'
__versionalias__ = '20210809.01'
__version__ = '0.14.3'
__versionalias__ = '20210907.01'
......@@ -472,11 +472,12 @@ class Test_GeoArray(TestCase):
@parameterized.expand(_get_gA_inMem_notInMem())
def test_save(self, _, gA):
"""Test GeoArray.save."""
with tempfile.TemporaryDirectory(dir=os.path.join(tests_path, "tests", "data", "output"),
prefix='test_save_') as td:
# save GeoArray and validate output
for fmt in ['ENVI', 'GTiff']:
with tempfile.TemporaryDirectory(dir=os.path.join(tests_path, "tests", "data", "output"),
prefix='test_save_') as td:
# save GeoArray and validate output
for fmt in ['ENVI', 'GTiff']:
outpath = os.path.join(td, "TestGeoArray_10x11_copy.tif")
gA.save(outpath, fmt=fmt)
self.assertTrue(os.path.exists(outpath))
......
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