Don't fill masked output when reprojecting#3289
Closed
omarkhan wants to merge 1 commit intorasterio:mainfrom
Closed
Don't fill masked output when reprojecting#3289omarkhan wants to merge 1 commit intorasterio:mainfrom
omarkhan wants to merge 1 commit intorasterio:mainfrom
Conversation
Member
|
@omarkhan mind updating this PR to the latest? |
Contributor
Author
|
Apologies - I no longer have permission to push to this branch. I rebased here instead: #3471 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#3156 added a
maskedargument torasterio.warp.reproject:rasterio/rasterio/warp.py
Lines 254 to 255 in 64474c1
I tried calling
rasterio.warp.reprojectwithmasked=True, without passing a destination array. The documentation above suggests the output should be a masked array, but it's not. Reading through the code, it looks like a masked array is created but then immediately filled in:rasterio/rasterio/warp.py
Line 385 in 64474c1
I tried removing the
.filled(dst_nodata). The tests pass when I run them locally. I added a small test to check that the output is a masked array.