GFZ / arosics

AROSICS - Automated and Robust Open-Source Image Co-Registration Software
https://git.gfz-potsdam.de/danschef/arosics
Apache License 2.0
137 stars 26 forks source link

Timed out during polygonize operation #8

Open pbrotoisworo opened 2 years ago

pbrotoisworo commented 2 years ago

Description

I'm calculating X/Y shifts using large panchromatic images. It takes a long time to polygonize and it raises an error.

I checked the progress_mon.py file and it seems that the Timer object still assigns something to the timeout variable despite the default variable being None. This error also happens when I set progress=False.

I created a temporary fix by changing the progress bar code in progress_mon.py to always ignore Timer.timed_out

What I Did

coreg = COREG(im_ref=temp_ras_ref, im_tgt=temp_ras_secondary, nodata=(0, 0))
coreg.calculate_spatial_shifts()

# Traceback
Polygonize progress     |==================================----------------| 67.0% Complete  => 0:00:14Traceback (most recent call last):
  File "C:\Users\Angelo\Miniconda3\envs\georef\lib\site-packages\py_tools_ds\processing\progress_mon.py", line 164, in __call__
    self.print_progress(percent01 * 100)
  File "C:\Users\Angelo\Miniconda3\envs\georef\lib\site-packages\py_tools_ds\processing\progress_mon.py", line 121, in print_progress
    raise KeyboardInterrupt()
KeyboardInterrupt
michaldolnik commented 2 years ago

I experienced the same problem....

danschef commented 2 years ago

Thanks for reporting. To be able to reproduce this, I would need some test data.

Possible reasons for a timeout during polygonizing are:

As a workaround, you could set the parameter calc_corners to False when calling the COREG or COREG_LOCAL classes or crop the input datasets to their overlap area.

danschef commented 1 year ago

I close this because without test data, I cannot reproduce it. Feel free to open again, if the problem persists.