1

I'm working with the ModelBuilder in ArcMap version 10.5.
I have two layers : one is a raster that has only 1 value per pixel. The second layer is a raster that has 4 attributes.
I want to use the raster calculator in order to subtract the second layer from the first layer.
The problem is that I don't find any way to specify the attribute that I want to use for the subtraction.

I have seen Specify a field in attribute table with raster calculator and tried using lookup :

Lookup("layer_1","attribute")-"layer2"

Also tried to write it like this:

"layer_1"."attribute"-"layer2

But that didn't work and I get errors. I have also tried to drop the other fields but it did not allow to drop any of the other attributes, and the only one I could subtract was the one I need.

Is there any way I can select the correct attribute for my calculation?

2
  • 1
    You need to create a separate raster from a second. Use Lookup tool for that
    – FelixIP
    Commented Jun 19, 2021 at 9:32
  • Wow! This Lookup("layer_1","attribute") does work!
    – FelixIP
    Commented Jun 20, 2021 at 4:45

1 Answer 1

2

Much faster way to create raster in memory through Image Analysis window, e.g. in no time you can go from integer raster to float:

enter image description here

enter image description here

/Don't forget to specify output type on Genaral tab./

enter image description here

Your Answer

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

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