From 874064a00495cbeb811e1e47a12d1ca9a4022545 Mon Sep 17 00:00:00 2001
From: Daniel Scheffler <danschef@gfz-potsdam.de>
Date: Fri, 8 May 2020 00:45:43 +0200
Subject: [PATCH 1/8] DN2TOARadiance() now returns float32 radiance instead of
 float64. Bugfix in Orthorectifier._get_common_extent(). Revised
 Geometry_Transformer and Geometry_Transformer_3D classes. Updated minimal
 version of sensormapgeo which makes the orthorectification much faster
 (factor 6-10) and fixes the deadlock within sensormapgeo.

Signed-off-by: Daniel Scheffler <danschef@gfz-potsdam.de>
---
 .gitlab-ci.yml                                |  2 +-
 enpt/model/images/images_sensorgeo.py         |  5 +-
 .../orthorectification/orthorectification.py  |  5 +-
 .../spatial_transform/spatial_transform.py    | 69 +++++++------------
 requirements.txt                              |  2 +-
 setup.py                                      |  2 +-
 .../context/environment_enpt.yml              |  2 +-
 7 files changed, 35 insertions(+), 52 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 336d637e..e66c6cad 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,7 +38,7 @@ test_enpt:
 
     # install sensormapgeo, mvgavg
     # TODO: remove when included in docker container
-    - pip install sensormapgeo>=0.2.1
+    - pip install sensormapgeo>=0.3.0
     - pip install mvgavg
 
     # run nosetests
diff --git a/enpt/model/images/images_sensorgeo.py b/enpt/model/images/images_sensorgeo.py
index 19766470..bc38eeed 100644
--- a/enpt/model/images/images_sensorgeo.py
+++ b/enpt/model/images/images_sensorgeo.py
@@ -306,19 +306,20 @@ class EnMAP_Detector_SensorGeo(_EnMAP_Image):
                 LMAX = self.detector_meta.l_max
                 QCAL = self.data[:]
 
-                self.data = ((LMAX - LMIN)/(QCALMAX - QCALMIN)) * (QCAL - QCALMIN) + LMIN
+                radiance = ((LMAX - LMIN)/(QCALMAX - QCALMIN)) * (QCAL - QCALMIN) + LMIN
 
             elif self.detector_meta.gains is not None and self.detector_meta.offsets is not None:
                 # Lλ = QCAL * GAIN + OFFSET
                 # NOTE: - DLR provides gains between 2000 and 10000, so we have to DEVIDE by gains
                 #       - DLR gains / offsets are provided in W/m2/sr/nm, so we have to multiply by 1000 to get
                 #         mW/m2/sr/nm as needed later
-                self.data = 1000 * (self.data[:] * self.detector_meta.gains + self.detector_meta.offsets)
+                radiance = 1000 * (self.data[:] * self.detector_meta.gains + self.detector_meta.offsets)
 
             else:
                 raise ValueError("Neighter 'l_min'/'l_max' nor 'gains'/'offsets' "
                                  "are available for radiance computation.")
 
+            self.data = radiance.astype(np.float32)
             self.detector_meta.unit = "mW m^-2 sr^-1 nm^-1"
             self.detector_meta.unitcode = "TOARad"
         else:
diff --git a/enpt/processors/orthorectification/orthorectification.py b/enpt/processors/orthorectification/orthorectification.py
index 12c46a9b..deda248f 100644
--- a/enpt/processors/orthorectification/orthorectification.py
+++ b/enpt/processors/orthorectification/orthorectification.py
@@ -192,8 +192,8 @@ class Orthorectifier(object):
         S_lons, S_lats = enmap_ImageL1.meta.swir.lons, enmap_ImageL1.meta.swir.lats
 
         # get Lon/Lat corner coordinates of geolayers
-        V_UL_UR_LL_LR_ll = [(V_lons[y, x], V_lats[y, x]) for y, x in [(0, 0), (0, -1), (-1, -1), (-1, 0)]]
-        S_UL_UR_LL_LR_ll = [(S_lons[y, x], S_lats[y, x]) for y, x in [(0, 0), (0, -1), (-1, -1), (-1, 0)]]
+        V_UL_UR_LL_LR_ll = [(V_lons[y, x], V_lats[y, x]) for y, x in [(0, 0), (0, -1), (-1, 0), (-1, -1)]]
+        S_UL_UR_LL_LR_ll = [(S_lons[y, x], S_lats[y, x]) for y, x in [(0, 0), (0, -1), (-1, 0), (-1, -1)]]
 
         # transform them to UTM
         V_UL_UR_LL_LR_utm = [transform_any_prj(EPSG2WKT(4326), EPSG2WKT(tgt_epsg), x, y) for x, y in V_UL_UR_LL_LR_ll]
@@ -205,6 +205,7 @@ class Orthorectifier(object):
 
         # in case of 3D geolayers, the corner coordinates have multiple values for multiple bands
         # -> use the innermost coordinates to avoid pixels with VNIR-only/SWIR-only values due to keystone
+        #    (these pixels would be set to nodata later anyways, so we don need to increase the extent for them)
         if V_lons.ndim == 3:
             V_X_utm = (V_X_utm[0].max(), V_X_utm[1].min(), V_X_utm[2].max(), V_X_utm[3].min())
             V_Y_utm = (V_Y_utm[0].min(), V_Y_utm[1].min(), V_Y_utm[2].max(), V_Y_utm[3].max())
diff --git a/enpt/processors/spatial_transform/spatial_transform.py b/enpt/processors/spatial_transform/spatial_transform.py
index cb1dbab2..3aef5ae3 100644
--- a/enpt/processors/spatial_transform/spatial_transform.py
+++ b/enpt/processors/spatial_transform/spatial_transform.py
@@ -36,10 +36,8 @@ import numpy as np
 from scipy.interpolate import griddata as interpolate_griddata, interp1d
 from geoarray import GeoArray
 
-from sensormapgeo.sensormapgeo import \
-    SensorMapGeometryTransformer, \
-    SensorMapGeometryTransformer3D, \
-    AreaDefinition
+from sensormapgeo import SensorMapGeometryTransformer, SensorMapGeometryTransformer3D
+from sensormapgeo.transformer_2d import AreaDefinition
 from py_tools_ds.geo.projection import get_proj4info, proj4_to_dict, prj_equal, EPSG2WKT, WKT2EPSG, proj4_to_WKT
 from py_tools_ds.geo.coord_grid import find_nearest
 from py_tools_ds.geo.coord_trafo import transform_any_prj, transform_coordArray
@@ -72,35 +70,24 @@ class Geometry_Transformer(SensorMapGeometryTransformer):
                         tgt_prj:  Union[str, int] = None,
                         tgt_extent: Tuple[float, float, float, float] = None,
                         tgt_res: Tuple[float, float] = None,
+                        tgt_coordgrid: Tuple[Tuple, Tuple] = None,
                         area_definition: AreaDefinition = None):
         data_sensorgeo = GeoArray(path_or_geoarray_sensorgeo)
 
         if data_sensorgeo.is_map_geo:
             raise RuntimeError('The dataset to be transformed into map geometry already represents map geometry.')
 
-        if area_definition:
-            self.area_definition = area_definition
-        else:
-            if not tgt_prj:
-                raise ValueError(tgt_prj, 'Target projection must be given if area_definition is not given.')
-
-            # compute target resolution and extent (according to EnMAP grid)
-            proj4dict = proj4_to_dict(get_proj4info(proj=tgt_prj))
-
-            if 'units' in proj4dict and proj4dict['units'] == 'm':
-                if not tgt_res:
-                    tgt_res = (np.ptp(enmap_coordinate_grid['x']), np.ptp(enmap_coordinate_grid['x']))
-
-                if not tgt_extent:
-                    # use the extent computed by compute_output_shape and move it to the EnMAP coordinate grid
-                    area_definition = self.compute_areadefinition_sensor2map(
-                        data_sensorgeo[:], tgt_prj, tgt_res=tgt_res)
-
-                    tgt_extent = move_extent_to_EnMAP_grid(tuple(area_definition.area_extent))
+        # get EnMAP grid
+        tgt_epsg = WKT2EPSG(proj4_to_WKT(get_proj4info(proj=tgt_prj)))
+        tgt_coordgrid = (enmap_coordinate_grid['x'], enmap_coordinate_grid['y']) if tgt_epsg != 4326 else None
 
+        # run transformation (output extent/area definition etc. is internally computed from the geolayers if not given)
         out_data, out_gt, out_prj = \
-            super(Geometry_Transformer, self).to_map_geometry(data_sensorgeo[:], tgt_prj=tgt_prj,
-                                                              tgt_extent=tgt_extent, tgt_res=tgt_res,
+            super(Geometry_Transformer, self).to_map_geometry(data_sensorgeo[:],
+                                                              tgt_prj=tgt_prj,
+                                                              tgt_extent=tgt_extent,
+                                                              tgt_res=tgt_res,
+                                                              tgt_coordgrid=tgt_coordgrid,
                                                               area_definition=self.area_definition)
 
         return out_data, out_gt, out_prj
@@ -127,33 +114,27 @@ class Geometry_Transformer_3D(SensorMapGeometryTransformer3D):
                         path_or_geoarray_sensorgeo: Union[str, GeoArray, np.ndarray],
                         tgt_prj:  Union[str, int] = None,
                         tgt_extent: Tuple[float, float, float, float] = None,
-                        tgt_res: Tuple[float, float] = None
+                        tgt_res: Tuple[float, float] = None,
+                        tgt_coordgrid: Tuple[Tuple, Tuple] = None,
+                        area_definition: AreaDefinition = None
                         ) -> Tuple[np.ndarray, tuple, str]:
         data_sensorgeo = GeoArray(path_or_geoarray_sensorgeo)
 
         if data_sensorgeo.is_map_geo:
             raise RuntimeError('The dataset to be transformed into map geometry already represents map geometry.')
 
-        if not tgt_prj:
-            raise ValueError(tgt_prj, 'Target projection must be given if area_definition is not given.')
-
-        # compute target resolution and extent (according to EnMAP grid)
-        proj4dict = proj4_to_dict(get_proj4info(proj=tgt_prj))
-
-        if 'units' in proj4dict and proj4dict['units'] == 'm':
-            if not tgt_res:
-                tgt_res = (np.ptp(enmap_coordinate_grid['x']), np.ptp(enmap_coordinate_grid['x']))
-
-            if not tgt_extent:
-                # use the extent computed by compute_output_shape and move it to the EnMAP coordinate grid
-                tgt_epsg = WKT2EPSG(proj4_to_WKT(get_proj4info(proj=tgt_prj)))
-                common_extent = self._get_common_target_extent(tgt_epsg)
-
-                tgt_extent = move_extent_to_EnMAP_grid(tuple(common_extent))
+        # get EnMAP grid
+        tgt_epsg = WKT2EPSG(proj4_to_WKT(get_proj4info(proj=tgt_prj)))
+        tgt_coordgrid = (enmap_coordinate_grid['x'], enmap_coordinate_grid['y']) if tgt_epsg != 4326 else None
 
+        # run transformation (output extent/area definition etc. is internally computed from the geolayers if not given)
         out_data, out_gt, out_prj = \
-            super(Geometry_Transformer_3D, self).to_map_geometry(data_sensorgeo[:], tgt_prj=tgt_prj,
-                                                                 tgt_extent=tgt_extent, tgt_res=tgt_res)
+            super(Geometry_Transformer_3D, self).to_map_geometry(data_sensorgeo[:],
+                                                                 tgt_prj=tgt_prj,
+                                                                 tgt_extent=tgt_extent,
+                                                                 tgt_res=tgt_res,
+                                                                 tgt_coordgrid=tgt_coordgrid,
+                                                                 area_definition=area_definition)
 
         return out_data, out_gt, out_prj
 
diff --git a/requirements.txt b/requirements.txt
index a312f517..d05f8e25 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,7 +4,7 @@ scipy
 geoarray>=0.8.11
 py_tools_ds>=0.14.23
 arosics>=0.9.2
-sensormapgeo
+sensormapgeo>=0.3.0
 cerberus
 jsmin
 matplotlib
diff --git a/setup.py b/setup.py
index 33faf0a1..55c7ac06 100644
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,7 @@ with open("enpt/version.py", encoding='utf-8') as version_file:
     exec(version_file.read(), version)
 
 requirements = [  # put package requirements here
-    'numpy', 'pandas', 'scipy', 'geoarray>=0.8.11', 'py_tools_ds>=0.14.23', 'arosics>=0.9.2', 'sensormapgeo>=0.2.1',
+    'numpy', 'pandas', 'scipy', 'geoarray>=0.8.11', 'py_tools_ds>=0.14.23', 'arosics>=0.9.2', 'sensormapgeo>=0.3.0',
     'cerberus', 'jsmin', 'matplotlib', 'tqdm', 'utm', 'lxml', 'numpy-indexed', 'mvgavg',
     'sicor @ git+https://gitext.gfz-potsdam.de/EnMAP/sicor.git#egg=sicor'
 ]
diff --git a/tests/gitlab_CI_docker/context/environment_enpt.yml b/tests/gitlab_CI_docker/context/environment_enpt.yml
index 4e9d76be..ea6401bf 100644
--- a/tests/gitlab_CI_docker/context/environment_enpt.yml
+++ b/tests/gitlab_CI_docker/context/environment_enpt.yml
@@ -43,7 +43,7 @@ dependencies:
     - scipy
     - geoarray>=0.8.11
     - py_tools_ds>=0.14.25
-    - sensormapgeo>=0.2.1
+    - sensormapgeo>=0.3.0
     - cerberus
     - jsmin
     - tqdm
-- 
GitLab


From e6f94f8e903b0df59d6228aec01f2fc021992165 Mon Sep 17 00:00:00 2001
From: Daniel Scheffler <danschef@gfz-potsdam.de>
Date: Fri, 8 May 2020 17:06:20 +0200
Subject: [PATCH 2/8] Updated minimal version of sensormapgeo.

Signed-off-by: Daniel Scheffler <danschef@gfz-potsdam.de>
---
 .gitlab-ci.yml                                      | 2 +-
 requirements.txt                                    | 2 +-
 setup.py                                            | 2 +-
 tests/gitlab_CI_docker/context/environment_enpt.yml | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e66c6cad..3605740b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,7 +38,7 @@ test_enpt:
 
     # install sensormapgeo, mvgavg
     # TODO: remove when included in docker container
-    - pip install sensormapgeo>=0.3.0
+    - pip install sensormapgeo>=0.3.1
     - pip install mvgavg
 
     # run nosetests
diff --git a/requirements.txt b/requirements.txt
index d05f8e25..af74ae77 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,7 +4,7 @@ scipy
 geoarray>=0.8.11
 py_tools_ds>=0.14.23
 arosics>=0.9.2
-sensormapgeo>=0.3.0
+sensormapgeo>=0.3.1
 cerberus
 jsmin
 matplotlib
diff --git a/setup.py b/setup.py
index 55c7ac06..a8d1daae 100644
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,7 @@ with open("enpt/version.py", encoding='utf-8') as version_file:
     exec(version_file.read(), version)
 
 requirements = [  # put package requirements here
-    'numpy', 'pandas', 'scipy', 'geoarray>=0.8.11', 'py_tools_ds>=0.14.23', 'arosics>=0.9.2', 'sensormapgeo>=0.3.0',
+    'numpy', 'pandas', 'scipy', 'geoarray>=0.8.11', 'py_tools_ds>=0.14.23', 'arosics>=0.9.2', 'sensormapgeo>=0.3.1',
     'cerberus', 'jsmin', 'matplotlib', 'tqdm', 'utm', 'lxml', 'numpy-indexed', 'mvgavg',
     'sicor @ git+https://gitext.gfz-potsdam.de/EnMAP/sicor.git#egg=sicor'
 ]
diff --git a/tests/gitlab_CI_docker/context/environment_enpt.yml b/tests/gitlab_CI_docker/context/environment_enpt.yml
index ea6401bf..fcbdc04d 100644
--- a/tests/gitlab_CI_docker/context/environment_enpt.yml
+++ b/tests/gitlab_CI_docker/context/environment_enpt.yml
@@ -43,7 +43,7 @@ dependencies:
     - scipy
     - geoarray>=0.8.11
     - py_tools_ds>=0.14.25
-    - sensormapgeo>=0.3.0
+    - sensormapgeo>=0.3.1
     - cerberus
     - jsmin
     - tqdm
-- 
GitLab


From 6ea1aba4cbaccfe04c375d5e36b1542a840fa817 Mon Sep 17 00:00:00 2001
From: Daniel Scheffler <danschef@gfz-potsdam.de>
Date: Fri, 8 May 2020 18:42:39 +0200
Subject: [PATCH 3/8] Bilinear orthorectification now uses 8 neighbours instead
 of 32 which makes it much faster. Updated minimal version of sensormapgeo.

Signed-off-by: Daniel Scheffler <danschef@gfz-potsdam.de>
---
 .gitlab-ci.yml                                       |  2 +-
 HISTORY.rst                                          | 12 ++++++++++++
 .../orthorectification/orthorectification.py         |  5 ++++-
 requirements.txt                                     |  2 +-
 setup.py                                             |  2 +-
 tests/gitlab_CI_docker/context/environment_enpt.yml  |  2 +-
 6 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3605740b..a8f0b3b1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,7 +38,7 @@ test_enpt:
 
     # install sensormapgeo, mvgavg
     # TODO: remove when included in docker container
-    - pip install sensormapgeo>=0.3.1
+    - pip install sensormapgeo>=0.3.2
     - pip install mvgavg
 
     # run nosetests
diff --git a/HISTORY.rst b/HISTORY.rst
index 6edaf5c9..9bc50255 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -2,6 +2,17 @@
 History
 =======
 
+0.12.6 (2020-05-??)
+------------------
+
+* DN2TOARadiance() now returns float32 radiance instead of float64.
+* Bugfix in Orthorectifier._get_common_extent().
+* Revised Geometry_Transformer and Geometry_Transformer_3D classes.
+* Updated minimal version of sensormapgeo which makes the orthorectification much faster (factor 6-10)
+  and fixes the deadlock within sensormapgeo.
+* Bilinear orthorectification now uses 8 neighbours instead of 32 which makes it much faster.
+
+
 0.12.5 (2020-05-04)
 ------------------
 
@@ -59,6 +70,7 @@ History
 * Combined 'mask_water' and 'mask_land' attributes to 'mask_landwater'.
 * Renamed metadata attribute 'filename_mask_deadpixel' to 'filename_deadpixelmap' for consistency.
 
+
 0.12.0 (2020-04-09)
 -------------------
 
diff --git a/enpt/processors/orthorectification/orthorectification.py b/enpt/processors/orthorectification/orthorectification.py
index deda248f..32795f43 100644
--- a/enpt/processors/orthorectification/orthorectification.py
+++ b/enpt/processors/orthorectification/orthorectification.py
@@ -92,9 +92,12 @@ class Orthorectifier(object):
         tgt_extent = self._get_common_extent(enmap_ImageL1, tgt_epsg, enmap_grid=True)
         kw_init = dict(resamp_alg=self.cfg.ortho_resampAlg,
                        nprocs=self.cfg.CPUs,
-                       # neighbours=8,
                        radius_of_influence=30 if not self.cfg.ortho_resampAlg == 'bilinear' else 45
                        )
+        if self.cfg.ortho_resampAlg == 'bilinear':
+            # increase that if the resampling result contains gaps (default is 32 but this is quite slow)
+            kw_init['neighbours'] = 8
+
         kw_trafo = dict(tgt_prj=tgt_epsg, tgt_extent=tgt_extent)
 
         # transform VNIR and SWIR to map geometry
diff --git a/requirements.txt b/requirements.txt
index af74ae77..2ba9e10f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,7 +4,7 @@ scipy
 geoarray>=0.8.11
 py_tools_ds>=0.14.23
 arosics>=0.9.2
-sensormapgeo>=0.3.1
+sensormapgeo>=0.3.2
 cerberus
 jsmin
 matplotlib
diff --git a/setup.py b/setup.py
index a8d1daae..3c95b80a 100644
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,7 @@ with open("enpt/version.py", encoding='utf-8') as version_file:
     exec(version_file.read(), version)
 
 requirements = [  # put package requirements here
-    'numpy', 'pandas', 'scipy', 'geoarray>=0.8.11', 'py_tools_ds>=0.14.23', 'arosics>=0.9.2', 'sensormapgeo>=0.3.1',
+    'numpy', 'pandas', 'scipy', 'geoarray>=0.8.11', 'py_tools_ds>=0.14.23', 'arosics>=0.9.2', 'sensormapgeo>=0.3.2',
     'cerberus', 'jsmin', 'matplotlib', 'tqdm', 'utm', 'lxml', 'numpy-indexed', 'mvgavg',
     'sicor @ git+https://gitext.gfz-potsdam.de/EnMAP/sicor.git#egg=sicor'
 ]
diff --git a/tests/gitlab_CI_docker/context/environment_enpt.yml b/tests/gitlab_CI_docker/context/environment_enpt.yml
index fcbdc04d..8351a3f4 100644
--- a/tests/gitlab_CI_docker/context/environment_enpt.yml
+++ b/tests/gitlab_CI_docker/context/environment_enpt.yml
@@ -43,7 +43,7 @@ dependencies:
     - scipy
     - geoarray>=0.8.11
     - py_tools_ds>=0.14.25
-    - sensormapgeo>=0.3.1
+    - sensormapgeo>=0.3.2
     - cerberus
     - jsmin
     - tqdm
-- 
GitLab


From 034eedbed90098351a9e182f0588e4260550f886 Mon Sep 17 00:00:00 2001
From: Daniel Scheffler <danschef@gfz-potsdam.de>
Date: Sat, 9 May 2020 00:15:36 +0200
Subject: [PATCH 4/8] Updated docker installer. The test_enpt CI job now
 updates pyresample before.

Signed-off-by: Daniel Scheffler <danschef@gfz-potsdam.de>
---
 .gitlab-ci.yml                                       | 2 ++
 tests/gitlab_CI_docker/build_enpt_testsuite_image.sh | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a8f0b3b1..2119d731 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -41,6 +41,8 @@ test_enpt:
     - pip install sensormapgeo>=0.3.2
     - pip install mvgavg
 
+    - conda update -c -y conda-forge pyresample
+
     # run nosetests
     - make nosetests  # test are called here
 
diff --git a/tests/gitlab_CI_docker/build_enpt_testsuite_image.sh b/tests/gitlab_CI_docker/build_enpt_testsuite_image.sh
index 7e5eebef..28ca5d53 100755
--- a/tests/gitlab_CI_docker/build_enpt_testsuite_image.sh
+++ b/tests/gitlab_CI_docker/build_enpt_testsuite_image.sh
@@ -2,7 +2,7 @@
 
 context_dir="./context"
 dockerfile="enpt_ci.docker"
-tag="enpt_ci:0.7.1"
+tag="enpt_ci:0.12.6"
 gitlab_runner="enpt_gitlab_CI_runner"
 
 # get sicor project
-- 
GitLab


From 26b7746c56bb2b43767449df6a34693dacb559dd Mon Sep 17 00:00:00 2001
From: Daniel Scheffler <danschef@gfz-potsdam.de>
Date: Sat, 9 May 2020 00:18:33 +0200
Subject: [PATCH 5/8] Fix.

Signed-off-by: Daniel Scheffler <danschef@gfz-potsdam.de>
---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2119d731..78090635 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -41,7 +41,7 @@ test_enpt:
     - pip install sensormapgeo>=0.3.2
     - pip install mvgavg
 
-    - conda update -c -y conda-forge pyresample
+    - conda update -y -c conda-forge pyresample
 
     # run nosetests
     - make nosetests  # test are called here
-- 
GitLab


From d08460b9b3978ad505a8158a51ab9994403a8148 Mon Sep 17 00:00:00 2001
From: Daniel Scheffler <danschef@gfz-potsdam.de>
Date: Sat, 9 May 2020 01:05:31 +0200
Subject: [PATCH 6/8] Updated minimal version of sensormapgeo.

Signed-off-by: Daniel Scheffler <danschef@gfz-potsdam.de>
---
 .gitlab-ci.yml                                      | 2 +-
 requirements.txt                                    | 2 +-
 setup.py                                            | 2 +-
 tests/gitlab_CI_docker/context/environment_enpt.yml | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 78090635..8a8755c7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,7 +38,7 @@ test_enpt:
 
     # install sensormapgeo, mvgavg
     # TODO: remove when included in docker container
-    - pip install sensormapgeo>=0.3.2
+    - pip install sensormapgeo>=0.3.3
     - pip install mvgavg
 
     - conda update -y -c conda-forge pyresample
diff --git a/requirements.txt b/requirements.txt
index 2ba9e10f..7b673f06 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,7 +4,7 @@ scipy
 geoarray>=0.8.11
 py_tools_ds>=0.14.23
 arosics>=0.9.2
-sensormapgeo>=0.3.2
+sensormapgeo>=0.3.3
 cerberus
 jsmin
 matplotlib
diff --git a/setup.py b/setup.py
index 3c95b80a..010af1b0 100644
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,7 @@ with open("enpt/version.py", encoding='utf-8') as version_file:
     exec(version_file.read(), version)
 
 requirements = [  # put package requirements here
-    'numpy', 'pandas', 'scipy', 'geoarray>=0.8.11', 'py_tools_ds>=0.14.23', 'arosics>=0.9.2', 'sensormapgeo>=0.3.2',
+    'numpy', 'pandas', 'scipy', 'geoarray>=0.8.11', 'py_tools_ds>=0.14.23', 'arosics>=0.9.2', 'sensormapgeo>=0.3.3',
     'cerberus', 'jsmin', 'matplotlib', 'tqdm', 'utm', 'lxml', 'numpy-indexed', 'mvgavg',
     'sicor @ git+https://gitext.gfz-potsdam.de/EnMAP/sicor.git#egg=sicor'
 ]
diff --git a/tests/gitlab_CI_docker/context/environment_enpt.yml b/tests/gitlab_CI_docker/context/environment_enpt.yml
index 8351a3f4..2aa14e9c 100644
--- a/tests/gitlab_CI_docker/context/environment_enpt.yml
+++ b/tests/gitlab_CI_docker/context/environment_enpt.yml
@@ -43,7 +43,7 @@ dependencies:
     - scipy
     - geoarray>=0.8.11
     - py_tools_ds>=0.14.25
-    - sensormapgeo>=0.3.2
+    - sensormapgeo>=0.3.3
     - cerberus
     - jsmin
     - tqdm
-- 
GitLab


From 3f07571061f1a309ac5da3d73b0973a2564cdb33 Mon Sep 17 00:00:00 2001
From: Daniel Scheffler <danschef@gfz-potsdam.de>
Date: Sat, 9 May 2020 01:13:38 +0200
Subject: [PATCH 7/8] Added conda update to docker installer and updated
 git-lfs.

Signed-off-by: Daniel Scheffler <danschef@gfz-potsdam.de>
---
 tests/gitlab_CI_docker/context/enpt_ci.docker | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/gitlab_CI_docker/context/enpt_ci.docker b/tests/gitlab_CI_docker/context/enpt_ci.docker
index 411e8761..59f4bb95 100644
--- a/tests/gitlab_CI_docker/context/enpt_ci.docker
+++ b/tests/gitlab_CI_docker/context/enpt_ci.docker
@@ -9,7 +9,7 @@ ENV miniconda_dl 'Miniconda3-latest-Linux-x86_64.sh'
 # use miniconda 4.3.31 as workaround for "IsADirectoryError(21, 'Is a directory')" with version 4.4.10 (currently latest)
 # ENV miniconda_dl 'Miniconda3-4.3.31-Linux-x86_64.sh'
 ENV envconfig 'environment_enpt.yml'
-ENV git_lfs_v='2.6.1'
+ENV git_lfs_v='2.11.0'
 
 RUN /bin/bash -i -c "cd /root; wget https://repo.continuum.io/miniconda/$miniconda_dl ; \
     bash -i /root/$miniconda_dl -b ; \
@@ -20,6 +20,7 @@ COPY *.yml /root/
 
 # create an environment with all packages specified in $envconfig (name is 'enpt' -> also specified in $envconfig)
 RUN /bin/bash -i -c "source /root/miniconda3/bin/activate ; \
+    conda update -n base -c defaults conda ; \
     conda env update -f /root/$envconfig"
 
 # install git lfs
-- 
GitLab


From c9b74eed69cf450e78b1fc9eec27f794d0ca671e Mon Sep 17 00:00:00 2001
From: Daniel Scheffler <danschef@gfz-potsdam.de>
Date: Sat, 9 May 2020 01:53:38 +0200
Subject: [PATCH 8/8] Fixed linting. Cleaned test_enpt CI job.

Signed-off-by: Daniel Scheffler <danschef@gfz-potsdam.de>
---
 .gitlab-ci.yml                                         | 7 -------
 enpt/processors/spatial_transform/spatial_transform.py | 2 +-
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8a8755c7..0d27e304 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,13 +36,6 @@ test_enpt:
     # - python setup.py install
     # - cd ../../
 
-    # install sensormapgeo, mvgavg
-    # TODO: remove when included in docker container
-    - pip install sensormapgeo>=0.3.3
-    - pip install mvgavg
-
-    - conda update -y -c conda-forge pyresample
-
     # run nosetests
     - make nosetests  # test are called here
 
diff --git a/enpt/processors/spatial_transform/spatial_transform.py b/enpt/processors/spatial_transform/spatial_transform.py
index 3aef5ae3..89ffe6da 100644
--- a/enpt/processors/spatial_transform/spatial_transform.py
+++ b/enpt/processors/spatial_transform/spatial_transform.py
@@ -38,7 +38,7 @@ from geoarray import GeoArray
 
 from sensormapgeo import SensorMapGeometryTransformer, SensorMapGeometryTransformer3D
 from sensormapgeo.transformer_2d import AreaDefinition
-from py_tools_ds.geo.projection import get_proj4info, proj4_to_dict, prj_equal, EPSG2WKT, WKT2EPSG, proj4_to_WKT
+from py_tools_ds.geo.projection import get_proj4info, prj_equal, EPSG2WKT, WKT2EPSG, proj4_to_WKT
 from py_tools_ds.geo.coord_grid import find_nearest
 from py_tools_ds.geo.coord_trafo import transform_any_prj, transform_coordArray
 
-- 
GitLab