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

Processing raster rank algorithm #60605

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

nirvn
Copy link
Contributor

@nirvn nirvn commented Feb 14, 2025

Description

This PR introduces a new spatial analysis' raster rank algorithm:

image

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.

@nirvn nirvn added Feature Frozen Feature freeze - Do not merge! Processing Relating to QGIS Processing framework or individual Processing algorithms labels Feb 14, 2025
@github-actions github-actions bot added this to the 3.42.0 milestone Feb 14, 2025
Copy link

github-actions bot commented Feb 14, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 2dacc3e)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 2dacc3e)

@nirvn nirvn force-pushed the processing_raster_rank branch from 2575a0c to 371cca7 Compare February 14, 2025 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Frozen Feature freeze - Do not merge! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant