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

fix: comment where mask raster by polygons since the code does not work for some reasons #259

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

JinIgarashi
Copy link
Contributor

I found the below code does not work, and thread will end before finishing geometry_mask process. to be honest, I don't understand why this happens.

I just commented the below code to make sure download_raster function works.

masking raster data by project polygons can be desired in terms of reducing file size, but there is also no impact of computing zonal stats including all pixels. So, commented the code for now.

                    mask_arr = rasterio.features.geometry_mask(
                        geoms,
                        out_shape=(int(source_window.height), int(source_window.width)),
                        transform=src_window_transform,
                        invert=True
                    )
                    data = numpy.where(mask_arr, data, numpy.nan)

@JinIgarashi JinIgarashi added the bug Something isn't working label Mar 7, 2025
@JinIgarashi JinIgarashi temporarily deployed to azure container registry March 7, 2025 12:42 — with GitHub Actions Inactive
@JinIgarashi JinIgarashi temporarily deployed to github container registry March 7, 2025 12:42 — with GitHub Actions Inactive
@JinIgarashi JinIgarashi merged commit a92054b into main Mar 7, 2025
3 checks passed
@JinIgarashi JinIgarashi deleted the fix/258-rwi branch March 7, 2025 12:53
@JinIgarashi JinIgarashi linked an issue Mar 7, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rwi component does not work
1 participant