Hallo,
I'm trying to create a model that uses values from a single table, in order to perform a different calculation for each raster in a file.
Each raster is represented in the table by a row that contains the raster unique name (string), and 2 other fields with the numeric values for the calculation (slope & intercept).
I use "Iterate rasters" to go through the files, and "Table Select" where I select the relevant row for the parameters, by using %Name% (from the iterator) = name (the raster name in the table).
Doesn't work... the model gets stuck in the "Table Select" stage.
Does anyone have any idea why?
I attached python code and image of the model.
Thank you!
Solved! Go to Solution.
Okay try this:
Add a Calculate Value tool in to calculate a valid name for the output table the code would be
"%Name%".split(".")[0]
Then change the output table name to t_%TableName%
Thanks a lot
I'll try it on Sunday
Perfect thanks!
Now I recognize another problem...
The model (Table select) selects only the first row in the table, the following outputs are empty tables
Thank you again,
Your solution works great, but I I came across other two problems I have not seen before:
1. The select tool is case sensitive
2. The model does not overwrite properly the previous outputs
After I treated these specific problems, everything works properly.