Computing footprint error
Hi Daniel, I am running into the following error, which I am not able to fix (see error message further down) Data overlap. Same projection, type, source, nodata, both are overlapping * ref image doesn't have super great quality, this was more a technical test. Same error in other places [**Data download**](https://drive.google.com/file/d/1ZW16u94mrqcq4aDqppHrylGxfZOv6194/view?usp=sharing) ![image](/uploads/59e59e9f67ee2d2b6b393b73da607a48/image.png) I tried to play around with no data (with, without, image size, etc.) Platform: * Windows 10 * Anaconda environment with python 3.7.X * arosics (1.4.3) - same error with higher version **Input** ``` REFERENCE = r'reference_image\reference.tif' INFILE = r'input_images\target.tif' outfile = r'output_files\out.tif' ``` ``` # detect and correct global spatial shift CR = COREG(REFERENCE, INFILE, max_shift=200, path_out=outfile, fmt_out='GTIFF', out_crea_options=['COMPRESS=DEFLATE'], r_b4match=1, s_b4match=1) ``` **Output** > Calculating footprint polygon and actual data corner coordinates for reference image... > > Polygonize progress |==================================================| 100.0% Complete => 0:00:01 > > --------------------------------------------------------------------------- > AssertionError Traceback (most recent call last) > <ipython-input-27-23b3a79291b3> in <module> > 1 # detect and correct global spatial shift > ----> 2 CR = COREG(REFERENCE, infile, > 3 max_shift=200, path_out=outfile, > 4 fmt_out='GTIFF', > 5 out_crea_options=['COMPRESS=DEFLATE'], > > ~\AppData\Local\Continuum\anaconda3\envs\arosics2\lib\site-packages\arosics\CoReg.py in __init__(self, im_ref, im_tgt, path_out, fmt_out, out_crea_options, r_b4match, s_b4match, wp, ws, max_iter, max_shift, align_grids, match_gsd, out_gsd, target_xyGrid, resamp_alg_deshift, resamp_alg_calc, footprint_poly_ref, footprint_poly_tgt, data_corners_ref, data_corners_tgt, nodata, calc_corners, binary_ws, mask_baddata_ref, mask_baddata_tgt, CPUs, force_quadratic_win, progress, v, path_verbose_out, q, ignore_errors) > 398 # try: > 399 gdal.AllRegister() > --> 400 self._get_image_params() > 401 self._set_outpathes(im_ref, im_tgt) > 402 self.grid2use = 'ref' if self.shift.xgsd <= self.ref.xgsd else 'shift' > > ~\AppData\Local\Continuum\anaconda3\envs\arosics2\lib\site-packages\arosics\CoReg.py in _get_image_params(self) > 532 > 533 def _get_image_params(self) -> None: > --> 534 self.ref = GeoArray_CoReg(self.params, 'ref') > 535 self.shift = GeoArray_CoReg(self.params, 'shift') > 536 > > ~\AppData\Local\Continuum\anaconda3\envs\arosics2\lib\site-packages\arosics\CoReg.py in __init__(self, CoReg_params, imID) > 116 > 117 with warnings.catch_warnings(record=True) as w: > --> 118 _ = self.footprint_poly # execute getter > 119 > 120 if len(w) > 0 and 'disjunct polygone(s) outside' in str(w[-1].message): > > ~\AppData\Local\Continuum\anaconda3\envs\arosics2\lib\site-packages\geoarray\baseclasses.py in footprint_poly(self) > 499 > 500 # validation > --> 501 assert not polyVertices_outside_poly(self._footprint_poly, self.box.mapPoly, tolerance=1e-5), \ > 502 "Computing footprint polygon for %s '%s' failed. The resulting polygon is partly or completely " \ > 503 "outside of the image bounds." % (self.__class__.__name__, self.basename) > > AssertionError: Computing footprint polygon for GeoArray_CoReg 'reference' failed. The resulting polygon is partly or completely outside of the image bounds.
issue