Questions tagged [iterator]

In computer programming, an iterator is an object that enables a programmer to traverse a container.

58 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
1 answer
896 views

Preconditions not working on second iteration of ModelBuilder?

I'm working on a project where I have to iterate through geodatabases and handle some debug errors if they exist. For this I've created a ModelBuilder model, in ArcGIS 10.7. Essentially, what the ...
Eirik Osnes's user avatar
5 votes
0 answers
168 views

QGIS crashes when iterating twice on a layer?

I am facing an issue for the first time and can not manage to find out what's wrong? I am trying to write a function that takes in input the line ID, finds the node at the end of the line. Then looks ...
Nekkini's user avatar
  • 91
3 votes
0 answers
366 views

Run kriging in ModelBuilder with various shapefiles

I need to run kriging in a model, using 5 different point shapefiles. I put as input %Name% to run the different shapefiles, but in Z value field I have an error, because it's different in each ...
AndM's user avatar
  • 383
2 votes
1 answer
76 views

Iterating files in contents pane or in .mapx in ModelBuilder

I am using ArcGIS Pro 2.6.1. I have consolidated a map and was able to shorten the name of the files within the resulting consolidate map folders. Consolidate Map tool also creates a map.mapx file ...
Simela's user avatar
  • 21
2 votes
1 answer
129 views

Iterate Feature Selection freezes in ArcGIS Pro 2.7

I'm recreating a model on ArcGIS Pro 2.7 that I have used in the past on ArcMap 10.7.1. It is a model that takes a selected parcels layer, iterates through each selected parcel to find the addresses ...
Julio Garrido's user avatar
2 votes
0 answers
160 views

Adding multiple vector files in a folder as an input in QGIS processing modeler using iterator tool

I have shapefiles in a folder that I intend to use as an input in QGIS Processing Modeler. I would like to iterate within the folder to add each of the shapefiles as an input. It did it in ArcGIS ...
user8160648's user avatar
2 votes
0 answers
379 views

Clip feature (with selected attributes) with individual polygons using iterator: name error or repetitive selection

I have a bunch of locations (polygons) across the USA that I will use to clip a number of features and rasters (e.g., the National Hydrography Dataset). When I clip a dataset like the NHD with all of ...
nofunsally's user avatar
2 votes
0 answers
654 views

Error 999999, Table name is invalid - Zonal Stats as table

I am attempting to run a model that iterates rasters and computes zonal statistics returning a table. The raster's statistics are computer across all polygons in a specific shapefile. This model ...
geoscience123's user avatar
2 votes
0 answers
51 views

Iterator (Iterate Feature Selection) running loop in undesired path using ArcMap ModelBuilder?

I am building a model using Iterate Feature Selection. I want to run the Iterator -> select by location -> Calculate field, and after finishing this loop (#3 in the image below), I will continue to ...
user149087's user avatar
2 votes
0 answers
175 views

Model Builder iteration process problem: could not create the output tables invalid extension

I encountered problems with my Model Builder in Arcmap 10.4: I want to perform some statistics on my rasters using the same polygon (buffer). I use the Raster Iteretor and I did check if the extent ...
Maxime Troiani's user avatar
2 votes
0 answers
176 views

Logical operators and looping back through a process in Modelbuilder

I am using a series of models in ArcGIS Pro 2.1 to manage gaps and slivers on a very large dataset, and have hit a wall trying to use a logical operator. I have split the data into multiple smaller ...
Miss.AdventureOz's user avatar
2 votes
0 answers
137 views

Region Growing in Modelbuilder with Expand - while loop

I have a series of points (farms) for which I am trying to grow differently sized territories based on the quality of land. I've set up a model where I expand each farm by one cell, then run zonal ...
Hen Goodchild's user avatar
2 votes
0 answers
497 views

Extracting specific feature class from dataset in ModelBuilder?

I would like to be able to run a model that iterates through datasets and at one point extracts just a single point feature from within the dataset and save it in a different geodatabase. The problem ...
GeoJohn's user avatar
  • 1,986
2 votes
0 answers
401 views

Running a new iteration for each column of a dataset in ArcGIS

I'm pretty new to Modelbuilding, having just been turned onto it about a week ago on here. So my problem is, I currently have a dataset of habitats that change through time (from Immature to Mature, ...
HeidelbergSlide's user avatar
1 vote
0 answers
89 views

Using "Field Type" Variable (Derived from Field Iterator) as inline-variable (with a prefix string) in field calculator

I am trying to calculate the per person load discharge by multiplying "Service Population" of various years to a constant Double type variable fed as a parameter called "Loading". ...
HarsimK's user avatar
  • 21
1 vote
1 answer
192 views

Iterate over raster images and mosaic images based on same dates using Model Builder

I am trying to mosaic images with same dates in a folder. As there are images with different dates in the folder I have looped through the images with just SR_clip.tif extension using wildcard that I ...
vasudha chaturvedi's user avatar
1 vote
0 answers
185 views

Using ArcGIS Pro ModelBuilder to iterate through folders and create mosaic

I am trying to create one mosaic from every month of the year. I have 3 folders with raster files for each month. So I have been trying to create 12 different mosaics from these files without success. ...
UniStudent's user avatar
1 vote
0 answers
87 views

Using ModelBuilder to iterate row and calculate field (code block)

I would like to use "iterate row selection in ModelBuilder" and for each row, I want to use the field calculator's code block to create a conditional statement that goes: If field=0 then go ...
zitJack's user avatar
  • 21
1 vote
1 answer
602 views

Google Earth Engine: function to apply code to sequential dates

I have a code which creates a value for several different variables for a specific time period (usually over 1 month) and exports these as a CSV to my Google drive. You can find a link to the code ...
mikejwilliamson's user avatar
1 vote
0 answers
112 views

Using submodel within model in ArcGIS Desktop

I have two databases 175 shapefiles each I want to clip each one of them using the corresponding shapefile from the second database .. as I can't use two iterators I have to do a nested submodel ...
Martin Sam's user avatar
1 vote
0 answers
89 views

Error 000445 in iterate Resample for rasters in Arcpy

I'm trying to resample rasters using a foor loop. Something is going wrong but i don't know what... This is my code: import arcpy, os, math from arcpy import env from os.path import split, join from ...
Elisa m's user avatar
  • 145
1 vote
0 answers
242 views

Using ModelBuilder Iterator sub-model then append?

I've created an iterator as a sub-model that collects values, then a main model that appends those values together upon completion of all iterations. My issue is if the iterator runs 10 times, then I ...
David Seroy's user avatar
1 vote
0 answers
26 views

Adding input files of near tool using %name% or %value% function?

I am trying to caluclate the nearest distance between road and road_buf shp. But I'm struggling to add input features using %name% function in NEAR TOOL. I want to add road_buf file as "c:Desktop\...
user127580's user avatar
1 vote
0 answers
174 views

Using ModelBuilder to Iterate Row Selection with ArcMap?

I have a model that does a lot of linear calculations, then eventually runs into an ITERATE ROW SELECTION tool. I only want the iterator to cycle through the tools downstream of itself, but instead ...
Mac McMahan's user avatar
1 vote
0 answers
1k views

Iterating polygons in folder as input in QGIS Modeler like ArcGIS ModelBuilder

How do I iterate polygons in a folder as input in QGIS modeller? Usually, ArcGIS can iterate polygons as an input for functions like union, merge, intersect, etc. But I cannot find the way to do ...
user127580's user avatar
1 vote
0 answers
73 views

Using For Iterator in ArcGIS ModelBuilder?

I'm trying to build a rather easy model but somehow couldn't find a solution to one problem: I work with a main model and a submodel which contains the iterator "for". I want to buffer a feature class ...
HaWa's user avatar
  • 31
1 vote
0 answers
53 views

Iterate rows in polygon, use result to select by location

I'm not overly familiar with iterators but basically I have a polygon with multiple rows. I want to select each row in that polygon feature class and use the selected polygon in a select by location ...
FND's user avatar
  • 11
1 vote
0 answers
395 views

Converting multiple shapefiles into raster using ArcGIS ModelBuilder?

I want to convert multiple shape files into raster files using iteration in ModelBuilder in ArcGIS. Each time I am facing the same error, which is showing: Error executing function. A column was ...
Soumabha karak's user avatar
1 vote
1 answer
501 views

pgr_Dijkstra: iterate/loop through a table with multiple OD pairs one-by-one

I have a table with 2 columns: column A with the startvertex and column B with endvertex. How can I do a OD pairs shortest path? It is with a loop I suppose, but how can this loop be implemented ...
ledobbel's user avatar
1 vote
0 answers
118 views

Iterating remap tables in ModelBuilder?

I'm new to ModelBuilder and have successfully used iterators for other things, but I'm having an issue with one particular model... I have one raster file showing direction to nearest coast ("...
Hen Goodchild's user avatar
1 vote
0 answers
289 views

Parse path multiple files and iterate multivalue or raster in ModelBuilder?

I have 2 files (rasters) (p1.img and p2.img), upon which I want that all model steps run. There are numeric steps from a to p (a, b, c, ..., etc) on the model. I tryed two iterators: multivalue and ...
Thallita Grande's user avatar
1 vote
0 answers
69 views

Using ModelBuilder to count number of times pixel has value higher than zero for more than three consecutive rasters?

I am quite new to the iterators within ModelBuilder. I have 2500 rasters representing a temperature in a region of Norway on a given day at 1 km resolution. I am interested in when the temperature is ...
user3652893's user avatar
1 vote
0 answers
294 views

Iterate feature classes to append a folder of shapefiles to their corresponding feature classes in a preset geodatabase template?

I want to make a tool with iterate feature classes that will take my shapefile folder and append each shapefile to it's corresponding feature class in a template geodatabase. I have a folder with ...
Chris's user avatar
  • 153
1 vote
0 answers
60 views

Choosing Iterator when using TAB Reader in ArcGIS ModelBuilder?

I have added the TAB Reader 5.2 tool to a model; TAB Reader (from DataEast) can convert multiple MapInfo tab files to ArcGIS format. However, I would like to iterate through many folders, each of ...
val's user avatar
  • 631
1 vote
0 answers
37 views

Filtering a polygon by area with multiple iterations?

I am currently working on a habitat conservation map in ArcGIS 10.3. I want to filter out smaller areas from my polygon layer, but as I'm not sure what the appropriate habitat patch size is for this, ...
AKubes's user avatar
  • 43
1 vote
0 answers
288 views

Summary statistics from feature iterator and select by location - missing selected feature name. Arcmap 10.2

I'm trying to calculate summary statistics for a subset of a point feature, based on selecting by location. I'm using a feature selection iterator to get statistics for each polygon feature in the '...
Ted's user avatar
  • 11
1 vote
0 answers
494 views

Double Iteration Intersect in Model Builder

I need to intersect two highly-overlapping shapefiles, the first with 60 polygons (ponds), the second with 3000 (lilly pads). A straight-up intersection does not work (60 x 3000 -- it runs for hours ...
woot's user avatar
  • 133
1 vote
0 answers
517 views

Using Collect Values in ArcGIS ModelBuilder with submodel?

I have a large model with submodels. Basically the Model iterates through all Districts, selects in each district an attribute above a certain threshold, creates a layerfile of it. The submodel ...
user3476078's user avatar
1 vote
0 answers
224 views

Loading existing datasets into empty geodatabase (with schema) in ModelBuilder with iterator and append?

I'd like to load existing feature classes within a dataset in one geodatabase into a new, empty geodatabase with schema already set up. Both geodatabases, the one containing the data and the one ...
Rudolph's user avatar
  • 11
1 vote
0 answers
55 views

Clipping only overlapping datasets using Iterator function in ArcGIS ModelBuilder?

I've create a geodatabase with about 100 feature classes for my home province. I want to be able to specify a project extent and clip the feature classes to that extent and save into a new ...
user37710's user avatar
  • 103
1 vote
0 answers
105 views

Iteratively Change Object's Instance Attributes PyQGIS

I am trying to create new instance attributes (NOT feature attributes) for a collection of features in a vector layer in PyQGIS. I'm getting some weird results and am wondering if this is even ...
rawdog's user avatar
  • 61
1 vote
0 answers
71 views

Using ModelBuilder or Python parser of Field Calculator to check values between two datasets?

I have a *.dbf that I need to check values against for a shapefile. I need to report whether the values match the dbf in the shapefile and, if not, what the value should have been (in two new fields)...
Elizabeth's user avatar
1 vote
0 answers
76 views

Why the iterator never ends?

I set a iterator to create two categories of feature class, and then join and dissolve them. The calculation works fine. However, the running result never shows completion even when the calculation ...
Wendy's user avatar
  • 21
1 vote
0 answers
111 views

Nested iterators - batch merge from multiple outputs

I'd like to ask you some advice for nesting an iterator (from a submodel) into a master model which also include an iterator (see pic attached). The whole purpose is to 'Merge' the iteration output of ...
dsa's user avatar
  • 11
1 vote
0 answers
1k views

Connect a sub-model with multiple outputs to current model

I have a model in model builder that is clipping multiple feature classes to my study area. It is running with an iterator and creating 4 new clipped feature classes that are only represented by one ...
Calavin's user avatar
  • 869
1 vote
0 answers
378 views

How to Iterate ModelBuilder for Zonal Statistics?

I want to use ModelBuilder to split a DEM into multiple tiles, then run the iterator on each tile made for the Zonal Statistics tool to find the highest point(s) in each tile and give these as an ...
Dot McCarthy's user avatar
0 votes
0 answers
52 views

Random error iterating add fields (multiple) to folder of shapefiles

I have a folder of shapefiles in iterating through and a series of processes. I am getting several seemingly random errors, between which field is the issue or on which shapefile it happens to, mostly ...
CarteCraft's user avatar
0 votes
1 answer
141 views

Pass a variable to a SQL Expression for a Select by Attribute in ModelBuilder

Working to create a script which iterates over a set of CSV files and then joins to a ZIP file. Once that is completed, it goes through to Select by Attribute to ensure we are looking only at true ...
John D's user avatar
  • 53
0 votes
0 answers
66 views

Iterate las files to Add Surface Information

I'm trying to run 'Add Surface Information' to populate elevation data from 100s of las files to a polygon in Model Builder. However it doesn't seem to matter whether I use Files or Datasets as an ...
Steve H's user avatar
  • 123
0 votes
0 answers
57 views

ArcMap ModelBuilder join field error

I need to create lines from points using bearing and distance tool. For a mass of files I use Iterator. Also I need to join attribute fields from source point layer to each line layer that made from ...
Sergio N.'s user avatar