I am using ArcMap 10.4.1

I have a DTM (10x10)m, and a raster (rasterized from polygon) that I want to subtract the DTM with.

In the picture below, four areas have different values I want to reduce the height of the dtm with, and the beige area is NoData. I tried simply just subtracting the rasters, but ended up with a different result than desired.

enter image description here

All data is lost except where data overlays. So I wonder how to set up the formula to get the original DTM to have its original values, except from the areas where the four values from the new raster will reduce the height.

enter image description here

1 Answer 1


In raster calculator arithmetic, any operation with a NoData Value will yield NoData.

The workaround is to first test if you have a NoData value, then perform different operation depending on the result of the test. The conditional operator in raster calculator is "Con(test, value_if_true, value_if_false)" so you have.

Con(IsNull("first_raster"), "second_raster", "second_raster"-"first_raster")

Furthermore, go to the "environment" properties of the tool to make sure that the output extent is the largest possible.

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.