Select to view content in your preferred language

Conditional expression for 2 rasters that intersect

116
1
03-17-2025 08:42 AM
Labels (2)
JohnEsch2
Occasional Contributor

I have 2 rasters that intersect vertically:  Fm1Top & Fm2Top. I most cases Fm1Top is above Fm2Top. In small areas Fm2Top has a higher elevation. I would like to build a Conditional expression:

If Fm1Top is greater than Fm2Top, use Fm1Top. If Fm1Top is less than Fm2Top, use Fm2Top

In in other cases I might want to use the above expression and subtract a value (ex 50) from Fm2Top if it is less than Fm1Top.

0 Kudos
1 Reply
BrendanNewell
Esri Contributor

hi @JohnEsch2 ,

Using the Raster Calculator in ArcGIS Pro you can build map algebra expressions using your above logic.

Scenario 1 -  Con("FM1">"FM2","FM1","FM2")

  • if FM1 is greater than FM2 THAN assign a the value as FME1, else assign a value of FM2

Scenario 2 -  Con("FM1">"FM2","FM1","FM2"-50)

  • if FM1 is greater than FM2 THAN assign a the value as FME1, ELSE assign a value of FM2-50

https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/conditional-evaluation-with-...

Give this a test and see if this produces the desired results

🙂
0 Kudos