How to assign weights as user-defined variables in model builder for the Weighted Overlay tool

267
0
04-06-2021 09:18 AM
BenMaxson
New Contributor

I am trying to create a model in ArcMap 10.7.1 that will create a weighted overlay of a population density raster, a land cover raster, and a traffic volume raster. The goal is for the user to choose which weight to give each raster. I have been trying to use the Calculate Value (model builder only) tool to create a weighted overlay table that will allow the user to enter the weights. The model will be published as a geoprocessing service and used within a web mapping application.

This is my model, followed by a screenshot of the code used in the calculate value tool:

BenMaxson_0-1617725085247.png 

BenMaxson_2-1617725370534.png

I created a variable for the expression for the calculate value tool, which uses inline variable substitution to allow the user to enter the weights as model parameters. Here is the expression: 

BenMaxson_3-1617725400507.png

This calculate value tool works for me, and if I run it, and then add the weighted overlay tool to the model, I can run the weighted overlay. However, when I try to run the model as whole, the weighted overlay tool becomes white, meaning that it is not ready to  be run. When using the GUI for the model, I receive an error saying that the weighted overlay table does not exist. 

Here is the table that appears to be used by the weighted overlay tool when I run each tool individually in model builder:

BenMaxson_4-1617725524802.png

The weighted overlay runs successfully doing each tool individually, as shown in the screenshot below, but when run as a whole, the weighted overlay tool becomes white, like in my first image. 

BenMaxson_5-1617725762342.png

 

Finally, here is the GUI along with the error message that I receive: 

BenMaxson_6-1617725804707.png

 

If anyone has any ideas on why my weighted overlay table is not being read as the correct type, or notices any other issue that may be causing this result, I would greatly appreciate it!

0 Kudos
0 Replies