Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timed out during polygonize operation #8

Open
pbrotoisworo opened this issue Mar 4, 2022 · 3 comments
Open

Timed out during polygonize operation #8

pbrotoisworo opened this issue Mar 4, 2022 · 3 comments

Comments

@pbrotoisworo
Copy link

  • arosics version: 1.7.6
  • Python version: Python 3.8
  • Operating System: Windows 8

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
Copy link

I experienced the same problem....

@danschef
Copy link
Collaborator

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

Possible reasons for a timeout during polygonizing are:

  • very large input datasets
  • very complex footprints of the input datasets
  • nodata value incorrectly set or many nodata pixels within the image footprints

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants