Questions tagged [iterator]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
600 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 ...
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 ...
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 ...
1 vote
1 answer
412 views

Error 000735 when using collect values

I am using a Feature Class Iterator in a Submodel ending with Collect Features: The main model looks like this: When I want to run it I only get this error: I have no clue why he says the value ...
0 votes
1 answer
358 views

ModelBuilder using iterator as precondition

Was wondering how I can iterate over field values and when all the iteration is done to move onto the group at the end. I've tried setting a precondition within the loop but that just causes the whole ...
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 ...
5 votes
3 answers
276 views

Looping every features pair with PyQGIS

I need code that loops between each pair of features in sequence (feature 1 with feature 2, feature 2 with feature 3...) but using only a for, I searched the forum and found similar code but with two &...
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". ...
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 ...
1 vote
1 answer
46 views

ArcGIS Pro Feature Class Iterator wildcard with or without enterprise GDB fully qualified feature class names?

I'm using the Feature Class iterator in an ArcGIS Pro ModelBuilder model to iterate over all feature classes with a name that start with (eg) "blah". I can make this work for our enterprise ...
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 ...
4 votes
1 answer
287 views

"Could not load source layer for MASK: invalid value" error when iterating over features in polygon layer and clipping raster by mask layer in PyQGIS

I have just started using PyQGIS and need to loop over parcels in a vector layer to clip a raster layer. For each parcel, I want to generate a .tif file with the feature.id() in the filename. I will ...
0 votes
1 answer
269 views

Convert Table Column to Comma Separated String

ArcGis Pro 3.0.2 Is there a way to use native tools to convert a column in my Table to a long String where values at separated by a comma? e.g. my column 1 2 3 Becomes "1,2,3" I tried using ...
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 ...
1 vote
2 answers
2k views

Interpolation iteration using ArcPy

My current project requires interpolation of state level weather data. Approximately 5 years of daily data needs to be interpolated. I still need to figure out the best interpolation method. However, ...
1 vote
1 answer
385 views

Calculating field when iterating file geodatabase using "if field exists" statement in ArcMap 10.3

I need to calculate certain field in every feature class within a file geodatabase in case this field exists. If it doesn't, I want iterator to skip appropriate feature class. I'm building a model, ...
0 votes
1 answer
39 views

Using ModelBuilder to select identical attributes in all other file geodatabase features

I have several datasets that all have the same reference number in them (this is an as-built CAD number). These can be points, lines and polygons. I am attempting to build a model that would select ...
2 votes
1 answer
725 views

Iterate through 30+ years of daily precipitation images to get monthly averages for the whole period

I'm using CHIRPS dataset to get daily precipitation images. My goal is to have one image per month representing monthly average for the entire period (1981-2021). I actually managed to get what I need....
7 votes
0 answers
175 views

Iterating model to create 3 buffers around three points and find their intersection (trilateration) in ArcMap [duplicate]

This past summer I recorded the location of a large number of plants I was working with by calculating the distance from each plant to each of 3 tripods for which I have GPS coordinates. I'm trying to ...
1 vote
2 answers
1k views

Using Value from Iterate Feature Selection to create new files per feature value

I am attempting to use Model Builder to export a file per value in a feature. The intent is to create a file per school, listing the students that attend. We currently have a single large file with ...
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 ...
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 ...
1 vote
1 answer
183 views

Updating attribute field with values from list calculation using PyQGIS

I have a shapefile and I need to update a field with calculation results. In the calculation I'm iterating through two list with equal items as features of the shapefile. The sum of the list items ...
0 votes
2 answers
701 views

Make NetCDF Raster Layer tool in ModelBuilder - Cannot export as geotiff

I am attempting to iterate through thousands of .nc files to convert them into geotiffs using the Make NetCDF Raster Layer tool. I am using ModelBuilder to accomplish this. The iterator works fine, ...
2 votes
2 answers
1k views

Iterating over features within Group Layer that will be identified with Wildcard using ModelBuilder of ArcGIS Pro

In the ModelBuilder of ArcGIS Pro 2.8.1, using Iterate Layers, I want to iterate over features that are in a group layer. It seems like I should be able to identify this group layer by using a ...
1 vote
1 answer
232 views

Turning values from one feature into Field names in another feature using ModelBuilder with ArcGIS Pro

I'm trying to use the Iterate Row Selection function to collect values from one feature, and then create a series of new Fields in another feature using the collected values as Field Names. There will ...
0 votes
1 answer
41 views

Accumulation Function Error in Google Earth Engine?

The below code is going to calculate accumulative temperature by adding each image to the previous ones. Despite it works and plots values but csv file shows many dates have been missed before. Does ...
3 votes
1 answer
400 views

Save geodataframes from list to separate shapefiles

I have a list of geodataframes which I imported from a folder full of shapefiles: import glob import geopandas as gpd shapefiles = glob.iglob('E:/folder/shapefiles/*.shp') gdfs = [gpd.read_file(file) ...
3 votes
2 answers
8k views

Using Value from Iterate Feature Selection to Calculate Field in ArcMap ModelBuilder

I am using ArcMap 10.1. I have two polygon feature classes, an alignment layer and a parcels layer. I am trying to use ModelBuilder to create a tool that will do the follow: iterate through groups in ...
0 votes
1 answer
56 views

Repeat extracting values from all rasters in a folder

I want to extract values from multiple .tif files in one folder to points, which means I repeat extracting values from multiple TIFF rasters many times. How can I do this using an iterator? I prefer ...
2 votes
1 answer
133 views

Clipping series of buffer zone polygons using series of boundary polygons that have same file name using ModelBuilder of ArcMap

I have an iteration problem. I have a series of polygons that represent 1000 m buffers of individual lakes. I would like to clip these buffers using individual polygon boundaries that represent lake ...
2 votes
1 answer
129 views

Using ArcPy to iterate feature classes for kriging

I have 12 feature classes and they are named from net_0 to net_11 but the order of feature classes In Arc catalog is,List_wells = [net_0,net_1,net_10,net_11,net_2,net_3,net_4,net_5,..net_9]. I used ...
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 ...
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 ...
2 votes
2 answers
1k views

Using a feature iterator Value variable in a SQL expression of select by attribute

I am using Iterate feature selection to select dealers one by one as input features to the Near tool. I'm using Select by Attributes to select sales points from that same dealer. How do I sync the ...
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. ...
1 vote
1 answer
85 views

Iterate Field Value and Select by Attribute in ArcMap does not select rows after first iteration

I'm running ArcGIS 10.3 on Windows 10. I need to find all the Block names and identify the record with the largest area. Then I need to calculate the Species across to the last field. However, it ...
0 votes
2 answers
367 views

How to iterate folder in a model that has a sub-model (iterate raster) in ModelBuilder

I have multiple folders that contain a number of raster files. What I would like to do is iterate through every folder and resample each every raster file from 1km to 30m. Since only one iterator is ...
0 votes
1 answer
327 views

Euclidean distance tool failing in model iterator ArcGIS Pro

I have a set of points representing houses (>500). I am calculating a cumulative viewshed for each house and mosaicing them onto a target raster using iterate feature selection. One of the tools ...
2 votes
2 answers
564 views

Joining multiple tables to multiple feature classes using ModelBuilder / arcpy

I have a list of tables (1,2,3) and would like to join the tables, tables by table, to a list of feature classes (1X,2X,3X). So that table 1 combines with feature class 1X, table 2 with feature class ...
1 vote
1 answer
1k views

ERROR 000728: Field Code does not exist in ModelBulider using iteration

The first join in the model is working, but after this the names of the fields are changing in the name of the Shape and a number . Therefore get the ERROR 000728. So I like to ask you if there is a ...
0 votes
0 answers
47 views

Inline variable substitution to end at a certain character

I am working in ArcGIS ModelBuilder. For one of my models I would like to use an iterator (Iterate Feature Classes) but am having difficulties with the Wildcard. Here is an example of some of the data ...
2 votes
1 answer
2k views

Check for field, add or skip to next step if exists in ModelBuilder?

I am building a model to add many fields to an iteration of feature classes. For each step (broken into sub-models) to add a field I am checking, using a boolean Field Check script, whether the field ...
-1 votes
1 answer
346 views

Using iterator in ModelBuilder with layers in REST Service

Is it possible to get an iterator in ModelBuilder to iterate through layers in a REST service? It appears to be possible to extract data from many REST service layers. However, I want to point an ...
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 ...
0 votes
1 answer
88 views

Iteration Error in Google Earth Engine?

The below code computes area elevation relationship by iteration algorithm. But when the interval sets to 0.5 shows same area values in a row(like the below picture). code link: https://code....
1 vote
1 answer
895 views

Using ModelBuilder to iterate through fields in shapefile and create raster from each

I have the exact same problem as Iterate Through Fields in Model Builder [sic] at GeoNet but all the solutions proposed there involved ArcPy and I'm not familiar with that program. I would like to use ...
0 votes
1 answer
924 views

Raster to polygon fails in ModelBuilder iteration

I need to vectorize some rasters to polygons and to do so, I use the "Raster to Polygon" tool in ArcGIS Desktop 10.4. As there are many rasters, I use a iteration in ModelBuilder. The output ...
0 votes
0 answers
116 views

Are there scenarios where the JSON payload from an AGOL webhook would have multiple collections in the array?

I have a webhook in AGOL that posts a JSON payload to an external system (Integromat). The webhook is triggered when features are edited in a feature layer (Change Types: FeaturesEdited). This is ...
0 votes
0 answers
98 views

ArcMap Modelbuilder Iterator (tables) - Not iterating DBF files [SOLVED]

I have a model created in ArcMAP 10.8 modelbuilder that has an iterator (tables) (standard setup). The model is setup in such a way that it runs various analysis on multiple DBF files in a folder. The ...

1
2 3 4 5
7