0

I need to use an iterator in a model process. My problem is that I always only have one output instead of three. There are three Polygons e to run. The output always only contains the last Polygon one and I have no clue why. I did name the output xy* Value * so that cannot be the problem.

Anyone any ideas?

I'm gonna explain it a bit more detailed. I've seen the other question with exactly the same title but I couldnt find an answer there.

I need do build a cost distance model which is based on a shp with 3 startpoints as input fpr cost distance tool and 3 shp with each containing an goal point as input for the cost path tool. I want to use an iterator so that it can run all three points with one run. The model should also be with variables so that it can be used for many regions. This is how it looks like with variables:

enter image description here

The names are written in German but I guess you can understand it. It works perfectly exept of the fact that it only puts out the last cost path. So the iterator works and runs each path correctly but only saves the last one. I did name the output with %Value% (thats what I meant yesterday with Value.. I was just a bit too tired to realise that I didnt wright it correctly..). So that cannot be the reason why it doesnt save the first two outputs.

I've also tried to run it with given inputs without variables but that didnt make it any better:

enter image description here

I also already tried collect value but that didnt change anything.

I really hope you guys have an idea.

Another problem is that I dont understand how I have to use an iterator with variables. Because the output name is meant to be empty. That means I cannot write %Value%.

7
  • 1
    Can you add a screenshot of your modelbuilder so it'e better to define the problem, also the name must be something like this xy_%Name% or xy_%Value%
    – Moh
    Mar 15, 2018 at 22:35
  • I now explained it a bit more detailed, I hope you can understand it.
    – Loki
    Mar 16, 2018 at 10:11
  • because you are using (Iterature feature selection), which it gives you the value as iteration output (e.g ID of your polygons), and not the feature itself.So this iteration can be used to iterate the cost distance with values (e.g max distance) and in this case, you will have all the outputs for all the values by defining (max distance = value) and the name (e.g shape_%Value%)
    – Moh
    Mar 16, 2018 at 11:29
  • You still can use this type of iteration, See this for more info , and in this case you have to group your iteration by (e.g polygon name field) and you define the export output as (cost_%Value%) and it will works
    – Moh
    Mar 16, 2018 at 11:45
  • I dont really exactly get your point I tried to add group layers but right now nothig really wants to work and I just get errors I will have to have a closer look at it this evening
    – Loki
    Mar 16, 2018 at 12:19

1 Answer 1

1

You still can get all of the outputs by using this type of iteration.

enter image description here

And in this case, you have to group your iteration by (e.g polygon name field) or any other field.

enter image description here

and you define the export output as (cost_%Value%) and it will works

enter image description here

The result will be all of the outputs with names (cost_%Value%)

enter image description here

Also another use of (Iterature feature selection), which it gives you the value as iteration output (e.g ID of your polygons), So these outputs values can be used for other options such as the cost distance (e.g max distance) and in this case, you will have all the outputs for all the values by defining (max distance = value) and the name (e.g shape_%Value%)

Helpful link for the different types of iteration

4
  • Thanks a lot! It works now that the iterator puts out 3 different outputs, the three start points. But I cannot get it that the three start points are connected with each goal point, all start points are connected with goal point one because if I write Zielpunkt_%Value% he says invalid Input.. Any ideas how I have to fix this?
    – Loki
    Mar 18, 2018 at 17:27
  • @Loki welcome, you can now mark the answer as accepted
    – Moh
    Mar 18, 2018 at 17:28
  • I did. Do you have an idea for the other problem?
    – Loki
    Mar 18, 2018 at 17:31
  • @Loki I didn't understand the other problem well, maybe this link is helpful for you. otherwise, you can create another question with the specific problem with more clarification.
    – Moh
    Mar 18, 2018 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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