# Conditional Combine Rasters and Track which Raster pixel used

I have 6 rasters with pixel values ranging from 0 to 1. I want to extract the highest pixel values from each raster to create a new raster, but also have a way to show which raster the highest value came from.

For example, pixel N has a value of 0.1 in Rast1, 0.5 in Rast2, 0.4 in Rast3. I would like to keep the value from Rast2 in the output raster and somehow keep track that this value came from Rast2 not Rast 1 or 3. Ultimately I would like to symbolize the raster by which original file it came from.

Is this possible?

• Raster data can only store one value per cell. If you need to store multiple values for your analysis, consider a vector based approach. What is your ultimate objective? Why do you need to keep track of which raster has the highest value?
– Aaron
Commented Jan 7, 2016 at 0:23
• Make 2 rasters... one with a value that identifies the raster that will be used and one with the value used. Con should be able to do that but the statement will be quite long. Commented Jan 7, 2016 at 0:25
• No need for Con, use highest position tool, see answer below. Commented Nov 8, 2016 at 2:35

2. Rather than an unwieldy `Con` function, use the Highest Position tool to determine which raster had the maximum value.
1. Step 1. Use `cell statistics` tool in ArcGIS, to make a raster of maximum values from input `raster1, raster2 and raster3`.<- let step1 output = MaxValue
2. Step 2. Use Conditional calculation: ```Con((Raster1 > Raster2)& (Raster1 >Raster3),1,Con((Raster2> Raster1)&(Raster2>Raster3),2,Con((Raster3>Raster1)&(Raster3>Raster2),3,0)))``` <- let step2 output = MaxRaster
3. Step 3. Use `Combine raster` tool to compine rasters MaxValue and MaxRaster.