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

SpaceEye - Adjusting reading windows for chips that fall close to the raster's boarder #183

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

rafaspadilha
Copy link
Contributor

@rafaspadilha rafaspadilha commented Jul 30, 2024

In the SpaceEye workflow, if the input geometry yields a window that is smaller than the chip size, we adjust it by splitting the difference between the chip's and window's width (height) half way to the right/left (top/bottom) sides of the original window. However if the input geometry falls close to the border of the raster, we might not be able to completely increase the window in one of the sides and end up with a window smaller than the chip size. Because of that, the workflow fails with "dim_size cannot be smaller than chip_size. Please consider reducing the step/chip size or increasing the input geometry."

This PR updates the _adjust_roi_window method, so the window is adjusted from both sides until reaching the chip size or reaching the border of the raster.

This fixes #180.

Copy link
Contributor

@robertomest robertomest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rafaspadilha rafaspadilha force-pushed the rpadilha/spaceeye_adjust_roi branch 2 times, most recently from 75cbbb7 to 2354ab8 Compare July 31, 2024 19:29
rafaspadilha added a commit that referenced this pull request Jul 31, 2024
@rafaspadilha rafaspadilha force-pushed the rpadilha/spaceeye_adjust_roi branch from 2354ab8 to 75dcad3 Compare July 31, 2024 19:31
rafaspadilha added a commit that referenced this pull request Aug 1, 2024
@rafaspadilha rafaspadilha force-pushed the rpadilha/spaceeye_adjust_roi branch from 75dcad3 to 65b9c35 Compare August 1, 2024 14:51
@robertomest robertomest force-pushed the dev branch 2 times, most recently from f3f687a to 8be7698 Compare August 1, 2024 16:31
@rafaspadilha rafaspadilha force-pushed the rpadilha/spaceeye_adjust_roi branch from 65b9c35 to adb1c30 Compare August 1, 2024 17:19
@rafaspadilha rafaspadilha merged commit 2fa6555 into dev Aug 1, 2024
9 checks passed
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

Successfully merging this pull request may close these issues.

3 participants