Can I use the Raster Calculator with a Table Iterator?

969
5
Jump to solution
05-06-2014 07:23 AM
MelissaSlater
New Contributor III
I need to perform a ???simple??? raster calculation using a Digital Elevation Model and a dbf table with a coefficient value (double); DEM10m * table value. 
The problem is that I need to do this over a thousand times and am trying to use the iterate table function in Model Builder to run through my list of dbf tables but get multiple errors each time.

ERROR 000539: Error running expression: rcexec()
Traceback (most recent call last):
  File "<expression>", line 1, in <module>
  File "<string>", line 5, in rcexec
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\sa\Functions.py", line 4298, in Times
    in_raster_or_constant2)
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\sa\Utils.py", line 47, in swapper
    result = wrapper(*args, **kwargs)
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\sa\Functions.py", line 4295, in Wrapper
    ["Times", in_raster_or_constant1, in_raster_or_constant2])
RuntimeError: ERROR 000732: Input Raster: Dataset srg12_coef does not exist or is not supported

Failed to execute (Raster Calculator).

Can a table iterator be used with the raster calculator?

How can I get the calculator to recognize/accept my tables? Do they need to be in a different format? Or do I need more explicit map algebra syntax that specifically tells the calculator to extract the value in row 1, column 2 of my tables?
Any help would be  so appreciated!
Thanks,
Melissa
0 Kudos
1 Solution

Accepted Solutions
curtvprice
MVP Esteemed Contributor
Multiple tables each with a single row...


In that case, the tool you need to use is Get Field Value, which can pull the value from the field into a model variable which you can in turn use in the Raster Calculator expression.

View solution in original post

0 Kudos
5 Replies
curtvprice
MVP Esteemed Contributor
Are you trying to iterate through a single table, with each row providing a value?
0 Kudos
MelissaSlater
New Contributor III
Multiple tables each with a single row...
0 Kudos
XanderBakker
Esri Esteemed Contributor
Hi Melissa,

Maybe the thread below can help you further:
http://forums.arcgis.com/threads/95111-multiplication-raster-by-table

Although it is based on a single table and does not use ModelBuilder but  Python coding, it should be able to provide you some insights.

Kind regards,

Xander
0 Kudos
curtvprice
MVP Esteemed Contributor
Multiple tables each with a single row...


In that case, the tool you need to use is Get Field Value, which can pull the value from the field into a model variable which you can in turn use in the Raster Calculator expression.
0 Kudos
MelissaSlater
New Contributor III
In that case, the tool you need to use is Get Field Value, which can pull the value from the field into a model variable which you can in turn use in the Raster Calculator expression.


That is just what I needed. Thank you!!
0 Kudos