Select to view content in your preferred language

How to rank pixel values from multiple rasters in ArcGIS Pro with Python

1032
4
03-15-2019 04:19 AM
FrankHanssen
Regular Contributor

Hi,

I have a stack of 20 ecosystem service rasters (values from 0 to 1) and I want to derive a ranked list of values from the stack when clicking on a pixel. Any ideas or recommendations? I am a newbee in Python, and would like to use the python code as a parametric tool in modelbuilder.

Best regards,

Frank

0 Kudos
4 Replies
curtvprice
MVP Alum

I think you may be underestimating the dimensionality of the problem, to pre-calculate this information per cell with a script tool would require cranking through an awful lot of data, it sounds like what you would want to do would require a sort of 20 values for every pixel, for an 1000x1000 x20 raster that's 20 million sorts. Unless I'm not understanding what you are asking for in your brief description.

0 Kudos
FrankHanssen
Regular Contributor

What I meant was to rank and list 20 values for a spesific pixel by clicking on it

Skaff deg Outlook for Android<https://aka.ms/ghei36>

0 Kudos
curtvprice
MVP Alum

Something along the lines of this, with the Feature Set linked to a point feature class as a tempalte, and Calculate Value populated with a python function to read results from the table, sort,  and return a formatted result, should do the trick.

extract values to points example

0 Kudos
FrankHanssen
Regular Contributor

Thanks a lot! I will check it out?

Skaff deg Outlook for Android<https://aka.ms/ghei36>

0 Kudos