Commit d7705afe authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Merge branch 'bugfix/fix_pseudo_proj' into 'master'

Bugfix/fix pseudo proj

Closes #84

See merge request !62
parents 4bec655c 85f46ed3
Pipeline #40375 passed with stages
in 21 minutes and 38 seconds
......@@ -13,7 +13,7 @@ test_enpt:
- source /root/mambaforge/bin/activate ci_env
# update geoarray and py_tools_ds
# - pip install 'geoarray>=0.8.11'
- pip install 'geoarray>=0.15.8' # TODO remove as soon as CI-runner is rebuilt
# - pip install 'py_tools_ds>=0.14.23'
# install sicor and perhaps switch sicor branch
......
......@@ -2,12 +2,18 @@
History
=======
0.18.8 (2022-03-16)
-------------------
* Fixed #84: Orthorectification fails if L1B data are pseudo-projected/rotated (!62).
0.18.7 (2022-03-10)
-------------------
* Fixed some style issues.
* Replaced deprecated URLs.
* Fix typo in requirements.
* Fixed typo in requirements.
* Excluded Python 3.10 intermediately due to debugger issue.
* Fixed indentation in Makefile.
* Improved error message in case a requirement of ACwater is missing.
......
......@@ -109,13 +109,13 @@ class Orthorectifier(object):
enmap_ImageL1.logger.info("Orthorectifying VNIR data using '%s' resampling algorithm..."
% self.cfg.ortho_resampAlg)
GT_vnir = GeoTransformer(lons=lons_vnir, lats=lats_vnir, fill_value=0, **kw_init)
vnir_mapgeo_gA = GeoArray(*GT_vnir.to_map_geometry(enmap_ImageL1.vnir.data[:], **kw_trafo),
vnir_mapgeo_gA = GeoArray(*GT_vnir.to_map_geometry(enmap_ImageL1.vnir.data, **kw_trafo),
nodata=0)
enmap_ImageL1.logger.info("Orthorectifying SWIR data using '%s' resampling algorithm..."
% self.cfg.ortho_resampAlg)
GT_swir = GeoTransformer(lons=lons_swir, lats=lats_swir, fill_value=0, **kw_init)
swir_mapgeo_gA = GeoArray(*GT_swir.to_map_geometry(enmap_ImageL1.swir.data[:], **kw_trafo),
swir_mapgeo_gA = GeoArray(*GT_swir.to_map_geometry(enmap_ImageL1.swir.data, **kw_trafo),
nodata=0)
# combine VNIR and SWIR
......
......@@ -83,7 +83,7 @@ class Geometry_Transformer(SensorMapGeometryTransformer):
area_definition: AreaDefinition = None):
data_sensorgeo = GeoArray(path_or_geoarray_sensorgeo)
if data_sensorgeo.is_map_geo:
if data_sensorgeo.is_map_geo and not data_sensorgeo.is_rotated:
raise RuntimeError('The dataset to be transformed into map geometry already represents map geometry.')
# run transformation (output extent/area definition etc. is internally computed from the geolayers if not given)
......@@ -135,7 +135,7 @@ class Geometry_Transformer_3D(SensorMapGeometryTransformer3D):
) -> Tuple[np.ndarray, tuple, str]:
data_sensorgeo = GeoArray(path_or_geoarray_sensorgeo)
if data_sensorgeo.is_map_geo:
if data_sensorgeo.is_map_geo and not data_sensorgeo.is_rotated:
raise RuntimeError('The dataset to be transformed into map geometry already represents map geometry.')
# run transformation (output extent/area definition etc. is internally computed from the geolayers if not given)
......
......@@ -27,6 +27,6 @@
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
__version__ = '0.18.7'
__versionalias__ = '20220310.01'
__version__ = '0.18.8'
__versionalias__ = '20220316.01'
__author__ = 'Daniel Scheffler'
......@@ -43,7 +43,7 @@ with open("enpt/version.py", encoding='utf-8') as version_file:
req = [
'arosics>=1.0.0',
'cerberus',
'geoarray>=0.9.0',
'geoarray>=0.15.8',
'jsmin',
'lxml',
'matplotlib',
......
......@@ -7,7 +7,7 @@ dependencies:
- python<3.10 # issue with PyCharm debugger and Python 3.10 which could not be tracked down so far
- pip # avoids that conda uses the wrong pip
- arosics>1.0.0
- geoarray>=0.9.0
- geoarray>=0.15.8
- lxml
- matplotlib
- numpy
......
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