Select to view content in your preferred language

Map Algebra in Model Builder

947
1
07-21-2022 06:52 PM
AidanArmstrong
New Contributor

I cannot seem to understand how to set the expression for the raster calculator tool within the model builder. It won't let me connect my raster to the tool. The raster is a Euclidean distance raster that I calculated from the shapefile of rivers. However, I want to reverse the Euclidean distance so that closest to the rivers is the highest value and the furthest away is the lowest. I also want to divide the index by its largest value in order to get a continuous scale from 0-1. 

 

Thanks.

0 Kudos
1 Reply
JohnWatt
Frequent Contributor

Hi Aidan.  Good problem. Some raster tools expect an integer data type as input - so double check that data-types match.  Looks like your dealing with floating point rasters.  To do the other things - should be a matter of some sequential math operations. eg subtract euclid dist cell value from dataset highest value (summary stats) to reverse, and normalise.  Re using raster calculator in modelbuilder - try separating the operations using 'Spatial Analyst Tools\Math' gp tools instead of Map Algebra\Raster Calculator  - might simplify things and help debugging.

0 Kudos