Select to view content in your preferred language

How to combine these three rasters according to this logic?

1008
3
05-25-2011 12:25 AM
by Anonymous User
Not applicable
Original User: Jamal432@gmail.com

How to combine these three rasters according to this logic?

please, see the attached images that show my question

explanation:

I've three rasters: slope, landuse and hydraulic conductivity. i need to combine them according the relation shown in the table (second attachment)

i convert the table shown in the second attachment to the following code:

-----------------------------------------------------------
if [Type] = "FieldCrop-Shrub" then
          if [FlowType] = "TYPE D" then
             Select Case [Slope]
    Case 1
       oo = .6
    Case 2
         oo =.4
    Case 3
        oo =.2
    Case Else
       oo =0
End Select
           else
          if [FlowType] = "TYPE E" then
             Select Case [Slope]
    Case 1
       oo = .8
    Case 2
         oo =.6
    Case 3
        oo =.4
    Case Else
       oo =0
End Select

          end if
end if
else
if  [Type]  = "Forest" then
          if [FlowType] = "TYPE D" then
             Select Case [Slope]
    Case 1
       oo = .8
    Case 2
         oo =.6
    Case 3
        oo =.4
    Case Else
       oo =0
End Select
           else
          if [FlowType] = "TYPE E" then
             Select Case [Slope]
    Case 1
       oo = 1
    Case 2
         oo =.6
    Case 3
        oo =.4
    Case Else
       oo =0
End Select

end if
end if
end if
end if

---------------------------------------------------------------------------

Now, how can i include this code to combine these three rasters?

thank you

regards

Jamal
0 Kudos
3 Replies
DarrenWiens2
MVP Honored Contributor

I know this is an old thread, but it popped up to the top, so here's a quick answer. The equivalent of if/then/else logic for rasters is the Con tool/statement.

Con(condition,do this if true, do this if false)

0 Kudos
Abdul_HameedKhorami1
New Contributor III

0 Kudos
XanderBakker
Esri Esteemed Contributor

As an alternative one could use the Combine—Help | ArcGIS for Desktop  tool to combine the rasters (have to be integer) and perform the analysis in the attribute table (create a new field with the result) and use the Lookup—Help | ArcGIS for Desktop tool to create the output raster based on the generated field.