-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Processing raster rank algorithm #60605
Open
nirvn
wants to merge
9
commits into
qgis:master
Choose a base branch
from
nirvn:processing_raster_rank
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
2575a0c
to
371cca7
Compare
…er adopting one band per rank
2dacc3e
to
05289e1
Compare
@nyalldawson , as requested, we're now looping through using a raster iterator. |
05289e1
to
2716ecd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Description
This PR introduces a new spatial analysis' raster rank algorithm:
The algorithm takes a collection of rasters as input and creates an output with cell values matching the rank order of a list of cell values take from the input collection of rasters. For e.g., if the list of input values for a given cell is [10,20,30,40] and the rank is 2, the output value will be 20.
The algorithm also allows for negative index rank. Given the same list of input values - [10,20,30,40] - using rank -2, the output value would be 30.
Finally, the algorithm offers to nodata handling behavior. By default, nodata values are excluded from the list and a given output cell will only be set to nodata if the rank is greater than the values list size. Users can also pick an alternative behavior whereas one or mode nodata values for a given cell in the input layers will result in a nodata value for that output cell. The alternative behavior matches what ArcMap is doing in its own raster rank algorithm.