Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am attempting to calculate cost distances iteratively for each point element in different datasets. I created a model that does the job for a single dataset but when I try to batch it I'm getting the following error "ERROR 000865: Input raster or feature source data: I_atlanta_OBJECTID does not exist". This is, the output layer generated in the "feature select" submodel is not a valid input in the cost distance or in any other process I put after the iterator. This error occurs only when I nested the model to run it in different datasets and not when I run the model in only one dataset.

snapshot of the model

Is there any consideration I have to take into account when nesting models? I have read the documentation available with no luck so far.

share|improve this question
1  
The double iteration may cause the CostDistance calculation to be performed many more times than needed. If the purpose is to find costs between all pairs (a,b) with a in one feature dataset (which I will take to be the less numerous of the two) and b in the other, then you need perform a CostDistance calculation only once for each feature in the first dataset (and then extract the results at the locations of each possible b, which is a single very fast operation). I realize this doesn't answer the question about double loops in MB, but it may be of some help. –  whuber Apr 2 '12 at 20:37
add comment

2 Answers

There are several ways to solve this issue:

  • script a nested loop within a python script
  • integrate a submodel into a model with a precondition
  • use the batch function of the model inorder to apply it several files (make input and outputfile of the model a parameter, then rightclick on the model > batch)

MGR

share|improve this answer
add comment

The ArcGIS help page for iterators in model builder says that you can only have one iterator per model. (It's the first note, below the table of iterator types.) Perhaps that is why you are having trouble trying to use two in the same model.

I believe if you want to use multiple iterators in modelbuilder you have to build a model for each one and then nest those models inside another one.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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