The issues I keep seeing depend on unique combinations of values.

I have three rocktype raster layers for area and they are edge-to-edge (they do not overlap). They each have "VALUE" fields and "COUNT" fields. There's one row of data for each attribute table where "VALUE"=1 where the rock type exists. I guess this is like mask.

What I need to do is combine these three rasters into one with raster calculator using this logic.

rocktype1==1, output value=1

rocktype2==1, output value=2

rocktype3==1, output value=3

Here's what I've tried:

Con("rocktype2"==1, 2) | Con("rocktype1"==1, 1) | Con("rocktype3"==1, 3)
Con("paleo"==1, 2, Con("precamb"==1, 1, Con("tert_quat"==1, 3))) 
rocktype1 + rocktype2 + rocktype3

I continuously get a blank output raster. What am I doing wrong here?

I'm using ArcMap 10.3.

  • (Raster1==1)+(raster2==1)*2+(raster3==1)*3 – FelixIP Apr 17 '16 at 9:48
  • this expression produced another blank raster output. – Stephen E Apr 17 '16 at 22:18
  • Set environment extent to union of inputs. – FelixIP Apr 17 '16 at 22:38
  • I've set that parameter in processing extent in envinronment settings and it still produces a blank raster – Stephen E Apr 17 '16 at 22:51
  • What does Raster==1 produces? – FelixIP Apr 17 '16 at 22:53

The raster calculator is working a different way.

First you need to declare your OutRaster that will be saved:

OutRas = Con(...)

Your expression may probably look like this (like your second try, but not sure why you set other names there):

OutRas = Con("rocktype1"==1,1,Con("rocktype2"==2,2,Con("rocktype3"==1,3)))

  • Oops sorry those are the actual names of the rocktypes, just forgot to change them for this purpose. I tried the expression you suggested and the output was only rocktype1. – Stephen E Apr 17 '16 at 22:19

As per comment by FelixIP, this expression worked for me:

  • Mark it as solved please to help others – FelixIP Apr 20 '16 at 2:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.