If-Then Data Value Logic for Rasters

602
2
Jump to solution
09-13-2021 04:56 PM
Labels (1)
AustinGootee
New Contributor III

Anyone know how to set up if then logic in ModelBuilder to return a true or false value based upon whether a raster dataset is integer or float? My model converts integer raster to floats, but sometimes my rasters already are floats so I'm trying to save some time by removing the redundancy via an if-then tool. I checked the if data type logic and it doesn't contain float and double won't work.

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

if-then logic can be implemented.  Did you see this?

If-then-else branching and logical tools—ArcGIS Pro | Documentation

in combination with the appropriate raster property.

Raster dataset properties—ArcGIS Pro | Documentation


... sort of retired...

View solution in original post

2 Replies
DanPatterson
MVP Esteemed Contributor

if-then logic can be implemented.  Did you see this?

If-then-else branching and logical tools—ArcGIS Pro | Documentation

in combination with the appropriate raster property.

Raster dataset properties—ArcGIS Pro | Documentation


... sort of retired...
AustinGootee
New Contributor III

Thank you, utilizing the get raster properties to return the value type, I was able to add that into an if value is logic to rule out whether the float tool was necessary or not. The property portion returns 9 for float and 2 for integer.

Capture.PNG

 

0 Kudos