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
5 votes
3 answers
281 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 &...
Mestrexama's user avatar
1 vote
0 answers
94 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
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
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 ...
Son of a Beach's user avatar
0 votes
1 answer
151 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
4 votes
1 answer
295 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 ...
Suzanna Cuypers's user avatar
0 votes
1 answer
278 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 ...
sushi's user avatar
  • 317
0 votes
0 answers
67 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
1 answer
41 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 ...
TheNoviceCode's user avatar
2 votes
1 answer
734 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....
Jecogeo's user avatar
  • 291
1 vote
1 answer
185 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 ...
Simon's user avatar
  • 89
0 votes
0 answers
58 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
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
1 answer
238 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 ...
J_P's user avatar
  • 13
0 votes
1 answer
369 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 ...
Narpity's user avatar
  • 61
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 ...
AmirHossein Ahrari's user avatar
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 ...
Tommi Chou's user avatar
2 votes
1 answer
134 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 ...
Ryan125's user avatar
  • 23
2 votes
1 answer
131 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 ...
ali1995's user avatar
  • 23
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 ...
sparky's user avatar
  • 450
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
1 vote
1 answer
391 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, ...
Vadim's user avatar
  • 115
1 vote
0 answers
187 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
1 answer
86 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 ...
MierMoto's user avatar
  • 423
3 votes
1 answer
403 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) ...
hbk's user avatar
  • 434
0 votes
1 answer
328 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 ...
Tom's user avatar
  • 11
2 votes
2 answers
574 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 ...
Jörn's user avatar
  • 21
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 ...
Jessica's user avatar
2 votes
1 answer
131 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
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
0 votes
1 answer
89 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....
AmirHossein Ahrari's user avatar
1 vote
1 answer
608 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
1 answer
903 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 ...
Josh Colston's user avatar
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 ...
User1974's user avatar
  • 1,122
0 votes
0 answers
100 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 ...
MSS's user avatar
  • 49
2 votes
0 answers
162 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
383 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
3 answers
233 views

Including float value in loop processing of Surface Volume tool using ArcMap ModelBuilder

How do I use the Surface Volume tool in ArcMap via Model Builder, without using Python, to process a set of multiple float values in a loop, since an iterator takes integers when I implement a for ...
Olli's user avatar
  • 153
1 vote
1 answer
77 views

Nesting iterators using ModelBuilder in ArcMap

I need to iterate all files in one folder/geodatabase, and perform those operations for all files in a different folder/geodatabase i.e. a matrix, of all entries in one, to all entries in another. ...
Mox's user avatar
  • 1,036
0 votes
2 answers
376 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 ...
SJL's user avatar
  • 9
-1 votes
1 answer
388 views

Using Model Builder iterators to create unique shapefiles from one big shapefile

I'm trying to use Model Builder in ArcMap to split one shapefile with multiple entries into unique ones and then create individual buffers for each of them. See image for the table. I think it should ...
Mutumba's user avatar
  • 213
2 votes
0 answers
661 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
0 votes
0 answers
104 views

Iterate Workspace not working in ArcGIS Pro ModelBuilder

I created a model in ArcGIS Pro that will delete features (ex. drainage areas) that intersect with unfeasible landcover classes within a raster (ex. impervious). So I used the following model ...
Mary's user avatar
  • 1
-1 votes
1 answer
352 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 ...
The_Spatial_Obsessive's user avatar
0 votes
0 answers
246 views

Iterating spatial join with multiple merge rules (and then creating raster) in ModelBuilder?

I'm using a Basic licence in ArcGIS Desktop 10.3 with Spatial & 3D Analyst extensions. I have a dbf file which contains point data for several days. I want my final output to be a) a point ...
EnMo's user avatar
  • 61
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
0 votes
1 answer
1k views

Iterating feature classes in multiple geodatabases using ModelBuilder?

I have 5 geodatabases. All have a feature dataset that contains a point feature class called "Point" and a line feature class called "Polyline." I want to go through these feature datasets, take only ...
Smithw1's user avatar
  • 335
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
3 votes
1 answer
78 views

Storing points from multiple GDBs as object

I often download data that comes in 30 minutes to 1-hour windows and then have to compile that data manually into one feature class, from multiple GDBs. I am trying to iterate through the separate ...
cameron's user avatar
  • 33
-1 votes
1 answer
354 views

How does 'Iterator row selection' function work?

How does the 'Iterator row selection' function work?
Jaime Vasquez Milla's user avatar

1
2 3 4 5
7