0

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))) 
Combine(["rocktype2","rocktype1","rocktype3"])
rocktype1 + rocktype2 + rocktype3

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

I'm using ArcMap 10.3.

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Apr 17, 2016 at 5:40
13
  • (Raster1==1)+(raster2==1)*2+(raster3==1)*3 Commented Apr 17, 2016 at 9:48
  • this expression produced another blank raster output. Commented Apr 17, 2016 at 22:18
  • Set environment extent to union of inputs. Commented Apr 17, 2016 at 22:38
  • I've set that parameter in processing extent in envinronment settings and it still produces a blank raster Commented Apr 17, 2016 at 22:51
  • What does Raster==1 produces? Commented Apr 17, 2016 at 22:53

2 Answers 2

1

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)))

answered Apr 17, 2016 at 6:18
1
  • 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. Commented Apr 17, 2016 at 22:19
0

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

~IsNull("precamb")+2*(~IsNull("paleo"))+3*(~IsNull("tert_quat")) 
PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
answered Apr 18, 2016 at 0:30
1
  • Mark it as solved please to help others Commented Apr 20, 2016 at 2:02

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.