Questions tagged [iterator]
In computer programming, an iterator is an object that enables a programmer to traverse a container.
323
questions
0
votes
0
answers
23
views
Accessing current feature attribute, when iterating over vector features input in QGIS Model Builder
I am trying to develop a process with the model builder in QGIS (3.38) where the process loads a CSV file as vector features, for the ability to go over each combination at a row level. The later part ...
0
votes
0
answers
31
views
Using "iterate by row" to combine rows with same value
I have a dataset with about 15,000 rows, each representing a census block that has been split across 1 of ~600 polygon zones (basically so each of the 600 zones is divided into the census blocks). I ...
0
votes
0
answers
24
views
Snap usage with for in ModelBuilder in ArcGIS [duplicate]
Did anyone manage to use the Snap tool with iterators?
I could not find what I should write the expression and code block for defining the variables of snap tool.
0
votes
0
answers
34
views
GeoMesa/Accumulo custom iterator
Tech stack:
Accumulo 2.1.0
GeoMesa tools 4.0.1
Java custom client
Goal:
A custom iterator configured at scan time that would filter key/values based on certain constraints.
Object Usage:
DataStore ...
0
votes
0
answers
36
views
ArcGIS 10.8.2 ModelBuilder, IterateFeatureClasses (RECURSIVE) is waiting forever
Iterator has not been working in the models I have built with ArcGIS Model Builder for the last month. It waits forever but it doesn't start. What could be the solution? I used it before without any ...
0
votes
0
answers
33
views
Iterating over 2 input raster folders for raster calculator in ArcGIS Pro ModelBuilder
I'm currently on a project in ArcGIS Pro where I want to calculate the RVI of a RS time series collected by Sentinel-1. Unfortunately, I only have for each date one Tif-file for the VH and one Tif-...
5
votes
3
answers
348
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
99
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
58
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
58
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
325
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 ...
5
votes
1
answer
362
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
355
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
71
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 ...
0
votes
1
answer
50
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
852
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....
1
vote
1
answer
218
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
0
answers
61
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
211
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
289
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
474
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 ...
0
votes
1
answer
43
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 ...
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
143
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
150
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
2
answers
2k
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 ...
2
votes
1
answer
83
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
1
answer
419
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, ...
1
vote
0
answers
205
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
100
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 ...
3
votes
1
answer
431
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) ...
0
votes
1
answer
346
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
683
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 ...
0
votes
0
answers
49
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
151
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 ...
1
vote
0
answers
91
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
93
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
688
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
1k
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
0
answers
121
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
108
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 ...
2
votes
0
answers
178
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 ...
2
votes
0
answers
414
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 ...
2
votes
3
answers
252
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 ...
1
vote
1
answer
85
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.
...
0
votes
2
answers
466
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 ...
-1
votes
1
answer
419
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 ...
2
votes
0
answers
711
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 ...
0
votes
0
answers
115
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 ...
-1
votes
1
answer
415
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 ...