1

I'm trying to combine two rasters in 10.3 using a con statement with the raster calculator in map algebra. (ie - con (raster 1 ==1, raster 1, raster 2)) where raster 1 is a smaller extent and does not have continuous values, and raster 2 is a land use raster. the output is always equivalent to raster 1 only. i've tried the CON tool, the "plus" tool instead of raster calculator (raster 1 + raster 2; so that i can then reclassify). with the "plus" tool, i get the combined values, but the values for raster 2 where there should be NoData for raster 1 are missing.

this is a simple process i've done many times with prior versions, so what am i missing?

1 Answer 1

1

You need to make sure both have the same extents (or at least an extent that covers both datasets). try something like:

  1. Con(IsNull(Raster1) & ~IsNull(Raster2),-1,Raster1) <- this should give you a raster 1 with all areas of no data turned to -1 with the extent expanded to include raster 2. You can change the truestatement into any number you like make sure you don't have the same value within the Raster1 that is why I chose a negative number.Let's say you named the above as Raster3.
  2. Then you can do your Con(raster3 ==1, raster 3, raster 2)

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.