1

Picture of my Model

I am trying to use the ModelBuilder for my master thesis. What I want to do is:

1) Create two new fields in a watershed feature class (contains several watersheds)

2) Use the watershed feature to clip each single watershed from a DEM

3) Calculate the hypsometric integral for each watershed

4) Write the derived values: a)"Value" = Number of watershed, b)"integral"= hypsometric integral for each watershed into the new fields of the input watershed feature class. ( I have drawn arrows in the screenshot.

The steps 1-3 are OK, that's working, but I have no idea how to do step 4. Is this possible? Is there a more elegant solution than my idea?

  • With steps 1-3 working, I think you should edit your question to focus it only on where you are stuck i.e. step 4. You say that it takes your input watershed feature class so can you tell us more about that, and then elaborate on what you need as outputs, please? – PolyGeo Jul 16 '14 at 10:58
  • I wanted to express the whole model, not just a part of it. I thought it would be easier to understand. The watershed feature class contains a number X of watersheds. With the model, I want the each feature to get a number (for assignment). In another column, I want to write the hypsometric integral for each particular watershed. That is calucated by the "hypsometric" tool and the output is the Value "integral". The second output of this tool "Rb_0%Value%Kurv" i will handle manually. – Halento Jul 16 '14 at 12:58
1

How about this:

  • Manually add the 2 fields to your watershed featureclass because at the moment the iterator will try and run that logic every time. So the Rb_Test_EZG layer feeds directly into the iterator.

  • Your iterator output I_Rb_Test_EZG could feed into 2 Field calculate tools that pass in the integral and value values using in-line substitution to your newly added fields. If you don't know what in-line substitution is then read the help file!

  • You would need to make the integral value a precondition to the field calculate tools to ensure it runs in the correct order.

  • I have it working, but it only writes the last integral value into all the rows of the field. But I need to have each value into the integral column. First watershed, first integral value, then the second value into the second row of the field and so on. Can you give me an advice if it is possible? I always end up with the last value in the entire field. I need something lke "write row" instead of "calculate field"... – Halento Jul 20 '14 at 9:48

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.