RASTER STATISTICS

2561
2
Jump to solution
10-20-2015 04:17 AM
anTonialcaraz
Occasional Contributor II

Hi,

I wonder if someone could give me some hints about how to tackle this issue:

I have 12 raster layers with values each representing a month (see table below).

I need to create in Python a new raster that gives me the number of the month with the highest values for a particular cell.

That is, if for example a cell has the value "32" and that is the highest of all the 12 cells representing the 12 months, then the output raster for that cell would have the value "9" because that is the month holding that highest value.

My guess is to combine dictionary and cell statistics but not quite sure how.

Hope it makes sense and thanks in advance

Tony

Capture.JPG

0 Kudos
1 Solution

Accepted Solutions
NeilAyres
MVP Alum

If I understand your problem correctly...

To get which raster in a stack of rasters has the highest value on a cell by cell basis, then look at the Highest Position tool in SA Tools / Local.

View solution in original post

2 Replies
NeilAyres
MVP Alum

If I understand your problem correctly...

To get which raster in a stack of rasters has the highest value on a cell by cell basis, then look at the Highest Position tool in SA Tools / Local.

anTonialcaraz
Occasional Contributor II

Thanks Neil. That's precisely what I needed. I hand't noticed this tool.

0 Kudos