I am working on a project with a colleague and we are looking for a way to automate the whole process of generating least cost paths from everywhere to everywhere in ArcGIS' ModelBuilder.

We have a grid of 637 points regularly distributed every 10 km across the landscape. We have a separate shapefile for each point in a geodatabase. We can easily generate the cost distance and backlink files for each of the source points by iterating with "Iterate Feature Classes". However, when it comes to creating the cost paths, there does not seem to be an easy way of automating the process, as it is not possible to use a second iterator in ModelBuilder. We are doing a couple of destination points each time (see an example in the figure), but this takes a long time.

Is there any way to automate this process?

We reinforce that, for methodological reasons, we need to generate each path separately from each source to each destination, instead of creating paths from a source to all other points.

enter image description here

  • 1
    I'm not very familiar with the specific tools you are using, but you can always use multiple iterators by nesting models. Create your model that has the first iterator and set the model to have needed input and output parameters. Then create a second model that has an iterator of its own and uses the first model as a submodel. Or simply create multiple models each with their own iterators and call all of them as submodels from a parent model... hope it helps get you started. – John Jul 13 '18 at 22:12
  • Thanks for the reply. We have considered nesting models in order to use more than one iterator. However, I couldn't figure out how to make it work, which tool to use in the second iterator to select each shp in the gdb as a destination. Do you have any ideas? Thanks. – 5Manik Jul 16 '18 at 11:58
  • Unfortunately, like I said, I don't have much familiarity with the specific tools you're using, sorry. But that said, basically, for some other intersecting features work I've done before, basically I've had a model that just iterated over all of the feature classes in a workspace, clipped them to a specific area of interest, and output that as the output parameter of the model. Then another model took an input feature class from prev model, and iterated over all FC in another workspace to intersect the input FC with each FC in the new workspace... don't know if that helps at all. – John Jul 16 '18 at 15:31

Your Answer

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

Browse other questions tagged or ask your own question.