I am using ModelBuilder to interpolate values with inverse distance weighting, iterated through several rows, resulting in many raster datasets - one raster layer per row. I have this and all the raster files are in one folder.

Next, I would like to select the value at specific coordinates, and repeat for each of the raster files, resulting in a table with a row for each coordinate-rasterlayer (so, total number of rows in the final table = # coordinates*number of raster layers in folder).

I added on to the original model, but it is creating an overall estimate from all the raster datapoints (so, total number of rows in this incorrect table = # coordinates)

How can I fix this model?

Here is the model I have now.

This works through the IDW step, creating this output, which is a raster layer per row in the original data

The goal is to create at table with estimates for each centroid coordinate from each raster layer. The zip_centroid is a point dataset with lon and lat I need estimates for.

  • Did you try adding inline_variable in your output, such as o3_2005_%Value% and then Merge the outputs?
    – fatih_dur
    Jan 25 '19 at 2:51
  • Sounds like a good idea. I will try that. Thank you. Jan 25 '19 at 16:42
  • adding the inline variable worked! Now trying to figure out how to merge all the tables into one wide table by coordinates. thank you! Jan 25 '19 at 20:08

I think the problem is that your model is overwriting the final output after each iteration. To avoid that you can use your Value inline_variable. Changing your output to o3_2005_%Value% will create separate copies of your Sample tables. The last step, merging all output tables, can be done by using Merge tool after a successful run of your model.

However, if you want to keep all processes in ModelBuilder, you should employ sub-model approach. I think you should add Collect Values tool to your current model to collect all Sample outputs and make this the Output Parameter. In a new model, you should add this model and Merge tool, and make your previous model's output (Collect Values) as the input to Merge.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.