Incompatibility with shapely 1.7.0.
As reported by Eric Reed, AROSICS is incompatible with shapely versions greater than 1.6.4:
I'm just getting started with AROSICS -- this is great. Great paper and documentation. I'm filing a bug report here instead of gitlab since I'm not sure how with that enterprise instance.
The latest version of shapely (v1.7.0) is incompatible with arosics (at least when running with the CLI in global mode). I needed to downgrade to an earlier version (conda install -c conda-forge shapely=1.6.4 did the trick). Consequently running through the install commands at http://danschef.gitext.gfz-potsdam.de/arosics/doc/_sources/installation.rst.txt (without pinning the shapely version) will error out.
EDIT: The following exception is raised:
Calculating actual data corner coordinates for reference image...
Bounding box of calculated footprint for reference image:
(331320.0, 5830000.0, 354000.0, 5862000.0)
Calculating actual data corner coordinates for image to be shifted...
Bounding box of calculated footprint for image to be shifted:
(335440.0, 5834970.0, 356180.0, 5866490.0)
Matching window position (X,Y): 345539.693646785/5847665.646781689
/opt/anaconda3/envs/arosics/lib/python3.8/unittest/case.py:633: UserWarning:
First attempt to check if functionality of co-registration failed. Check your input data and parameters. The following error occurred:
method()
E
Error
Traceback (most recent call last):
File "/opt/anaconda3/envs/arosics/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
yield
File "/opt/anaconda3/envs/arosics/lib/python3.8/unittest/case.py", line 676, in run
self._callTestMethod(testMethod)
File "/opt/anaconda3/envs/arosics/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
method()
File "/home/daniel/Code/python/arosics/tests/test_COREG_LOCAL.py", line 47, in test_coreg_init_from_disk
self.CRL = COREG_LOCAL(self.ref_path, self.tgt_path, **self.coreg_kwargs)
File "/home/daniel/Code/python/arosics/arosics/CoReg_local.py", line 235, in __init__
self.COREG_obj = COREG(self.imref, self.im2shift,
File "/home/daniel/Code/python/arosics/arosics/CoReg.py", line 329, in __init__
self._get_clip_window_properties() # sets self.matchBox, self.otherBox and much more
File "/home/daniel/Code/python/arosics/arosics/CoReg.py", line 726, in _get_clip_window_properties
matchBox.imPoly = round_shapelyPoly_coords(matchBox.imPoly, precision=0, out_dtype=int)
File "/opt/anaconda3/envs/arosics/lib/python3.8/site-packages/py_tools_ds/geo/vector/conversion.py", line 89, in round_shapelyPoly_coords
return shape(geojson)
File "/opt/anaconda3/envs/arosics/lib/python3.8/site-packages/shapely/geometry/geo.py", line 35, in shape
if not ob["coordinates"]:
Exception: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Edited by Daniel Scheffler