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.