Questions tagged [iteration]

Repeated execution of some groups of code statements.

Filter by
Sorted by
Tagged with
1
vote
1answer
13 views

Model Builder: How to iterate rasters into raster calculator

Above you can see I have a simple model in ArcGIS, when I run it, I change the ".tif" name in both sections of the calculation. I then hit OK, and it puts the new raster where it should be ...
0
votes
0answers
22 views

Iterate a feature by expression with unique values in PyQGIS [duplicate]

Im trying to automate the process of select by expression and afterwards export it to a new layer in Qgis using Python. The Layer I'm using is called "Brutvoegel" and my goal is to get all ...
1
vote
0answers
20 views

Iterate multiple tables for input into “Tables to Domain” tool in ArcGIS Pro ModelBuilder

I would like to iterate over multiple tables in a geodatabase then feed the tables into the "Table to Domain" tool in ArcGIS ModelBuilder. Currently it only seems to iterate over 1 table. I ...
4
votes
2answers
53 views

Iterate multiple soil fields through Calculate Field

I understand this can easily be done manually using Calculate Field, however I'm looking to automate this process using ModelBuilder as it is a requirement of the current module. I have 7 Weather ...
0
votes
0answers
18 views

Iterating the raster calculator expression for multiple rasters (point rasters and Line rasters)

I have created a raster calculator tool which identify 5m height (elevation) either side of middle point (point is converted into raster and contain elevation value) of cross section (line is ...
2
votes
0answers
41 views

Iterate through list with numbers (as text)

I want to iterate through a list of coordinates and see it the last coordinate matches the first coordinate. The coordinates are stored in have a GeoJSON string: '''{"type":"...
1
vote
0answers
31 views

PyQGIS line_locate_point

Using the field calculator I'm able to get this working fine: line_locate_point( geometry:=geometry(get_feature('trail', 'fid', '206')), point:=$geometry) But what I would like to do is using Python ...
1
vote
0answers
30 views

Program works in next 30 years with QGIS over multiple layers

For an asset management plan, I want to create a table that programs work for the next 30years. For a given layer, I want to use the start date and the project into future either replacements or ...
0
votes
1answer
23 views

Google Earth Engine: Sampling through image collection [closed]

I am trying to get samples from each image in an image collection and merge them into a single feature collection. So, I wrote the following code (https://code.earthengine.google.com/...
3
votes
1answer
72 views

Iterating and calculating with fields using PyQGIS

Inside my layer there are fields like this: name | data | length name_a | field_a_x | ... name_b | field_b_x | ... name_c | field_c_x | ... name_d | ...
0
votes
0answers
13 views

How to use a Value of an iterator row selection as a SQL request in ModelBuilder

I am trying to put as an input a XLS file with rows, each row represent the reference of an object. I would like to iterate each row, and for each reference, collect all the data from my geodatabase. ...
4
votes
1answer
56 views

Defining coordinate system for every GeoDataFrame (shapefile) in list

I am looking to set a coordinate system for every GeoDataFrame in a list of them. So I need this: gdfs[0].crs = "EPSG:6668" gdfs[1].crs = "EPSG:6668" And so on but iteratively. I ...
2
votes
1answer
47 views

Iteration over features in PyQGIS processing modules

I have an issue with processing.run commands where I would like to do an iteration over features in a layer with polygons. zsj = QgsVectorLayer("/data/grassmaster/testVlado/zsj_ba_test.gpkg",...
0
votes
1answer
33 views

Batch clipping all files in folder and then save using ArcPy

I'm trying to use a script to batch clip all files in a folder, then saved with a _clipped.shp at the end of the original, I need a script that is something like this: arcpy.env.workspace = "E:\\...
2
votes
2answers
61 views

Iterating clipping process through list of geodataframes

I have a folder full of shapefiles, I would like to read them into geopandas and then clip them all to one boundary iteratively. I have loaded all of the shapefiles into a list with this correctly ...
5
votes
1answer
104 views

Collect results of iterative processes in QGIS graphical modeler

I'm using QGIS graphical modeler to build an iterative process that is supposed to: extract features from vector layer 1 (VL1) overlapping with features from vector layer 2 (VL2) (iterative per ...
2
votes
1answer
31 views

ModelBuilder not passing information through Iterate Feature Classes using ArcGIS Pro

I am using ArcGIS Pro. I am trying to create a model to iterate through three feature classes in a file geodatabase, all with the same schema. The model performs several joins and field calculations ...
0
votes
1answer
24 views

Using multi iterate of ArcMap ModelBuilder

I want to use more than 2 iterates. The data I have is point.gdb, polygon data. There are about 2000 point.gdb. There are about 1000 polygon data. I want to save the points that exist in the polygon ...
0
votes
0answers
23 views

Looping using Iterate Features in ModelBuilder of ArcGIS Pro

I have a model that iterates through a dataset (iterate features), each feature has a defined set of steps that gets processed against another features. ie - take each feature from the dataset, run a ...
0
votes
2answers
56 views

Creating Raster to Point data using ArcMap ModelBuilder Iterate raster tool

Creating Raster to Point data using ArcGIS ModelBuilder Iterate raster Raster material is in folder (ffaa) Using Iterate rasters in model builder Select folder 1 (ffaa) in step 2 Raster to point ...
0
votes
1answer
80 views

Iterating fields using ModelBuilder in ArcGIS Pro

I am trying to combine multiple fields using the iterate fields in ArcGIS Pro ModelBuilder. I can iterate through and get the combined values but it only gives me the combination of one row, therefore ...
2
votes
1answer
202 views

How to Iterate through files in a folder QGIS, using python

I am using QGIS 3.16, and I am trying to run the “service area from layer” function on approximately 400 layers (200,000 starting points in total), I am also due to be repeating this at a range of ...
2
votes
2answers
211 views

Iterating over dates to extract precipitation in Google Earth Engine

I'm looking to sum precipitation for a period of 10-days prior to a specified date. This is just an example - in fact, I have around 60 different dates and I don't want to select each the date ...
2
votes
1answer
31 views

How to solve error: 'user-defined methods must return a value' in GEE?

I would like to iterate a map function over several list-of-lists. Here is the code I run: var feature1 = function(h) { var FCol= ee.FeatureCollection(ee.List(losslist.get(h)).map(function(element)...
1
vote
1answer
29 views

Clipping one shapefile file with 100 different shapefiles (Arcmap 10.1) and retrive 100 diferent outputs using ModelBuilder

I have tried without success to perform this task with ArcMap 10.1. I´m struggling with ModelBuilder. I have one shapefile (mean precipitation in one country) and I need to clip this shapefile with ...
1
vote
0answers
33 views

Failure to pick up attributes following use of ArcGIS Pro ModelBuilder: Iterate Feature Classes

I have a folder containing numerous point shapefiles (Species occurrence records) and (in a separate folder) a multipolygon shapefile of small parcels of land. For each species, I need to extract all ...
2
votes
1answer
68 views

Calculating final polygon after subtracting all intersecting polygons using shapely [closed]

I have a list of centroids that I buffer to 5000 meters radius. I need to take each resulting circle and run it against the remaining centroids(also buffered to 5000 m) and find the final shape after ...
0
votes
0answers
23 views

ArcMap ModelBuilder iterate Raster and field value of Feature Class with Raster Calculator

We have a geodatabase with rasters and one Feature Class with a field "Radfahrer" (Long Integer datatype). We try to multiply the rasters with the values of the fields with iteration: ...
2
votes
0answers
45 views

ArcMap ModelBuilder iterate Raster and Feature Class with Raster Calculator

In our model we calculate raster datasets with the cost distance and the raster calculator. We want to multiply these with a field value from the table testbezirk. We have already tried a few things, ...
3
votes
0answers
32 views

Calculating population within a circle excluding intersects with shapely

I have a data of a centroid and a count: centroid population id 0 POINT(38.9081 77.0349) 9004.0 0 1 POINT(38.8521,77.0377) 517.0 1 2 POINT(38.9081 77.0377) 10369.0 ...
1
vote
0answers
80 views

Iterating through layer using ArcPy

I'm a beginner in ArcPy and I want to perform some tasks using ArcPy but I am not getting results. I have two layers named survey and survey selection in my current MXD. I want to create map document ...
0
votes
0answers
17 views

Input feature mask name with variable - error 865

I have 73 raster files, with 73 corresponding shapefiles. I have to extract each of these raster by their corresponding shapefiles. I tried to call the shapefile using %Name%, since it has the same ...
2
votes
1answer
86 views

Running processing workflow in PyQGIS for every selected polygon separately in for loop

I would like to run the processing chain written in PyQGIS (as stated below) for every polygon that is extracted by the extractbyexpression separately. But, the code below does not do this for every ...
1
vote
1answer
67 views

Using ModelBuilder to Iterate through rasters and reclassify them

I'm trying to iterate through a folder which contains many Lidar-Intensity Images as .jpg files. I want to reclassify them all with the same thresholds (3 classes). I used the "Iterate Raster&...
4
votes
1answer
64 views

Iterative merging of .shp per folder through multiple folders using ArcGIS Pro ModelBuilder

In ModelBuilder for ArcGIS Pro, I'm trying to create an iterative model for merging pointfiles according to their names. This is a pre-processing step to handle echo-soundings, spread over one or ...
0
votes
1answer
270 views

Operating with Image collections (Band math operations)

I'm trying to obtain the NDSI index operating with a collection in GEE but always displays a error saying teres is a missing argument in a function and I cannot see the mistake as I followed the ...
0
votes
1answer
110 views

Compute NDVI over each image in an image collection and export NDVI thresholded images

I want to compute NDVI for all images in Sentinel2 (less than 20% cloud cover) in an image collection comprising 5 years. Thereafter, I want to batch export the output as a binary TIF file where NDVI &...
0
votes
0answers
44 views

Using glob to select all shapefiles in a subfolder within a for loop

I want to iterate a script through a number of subfolders within the folder TQ. Within each subfolder are a number of shapefiles that I need to merge and then rasterize. I created a for loop to ...
0
votes
0answers
25 views

How to count K Means iterations on Earth Engine?

I've used ee.Clusterer.wekaKMeans on a Sentinel 2 image and I was hoping to know if there's a way to see how many iterations were done after the clustering is complete. I know that one of the ...
2
votes
0answers
31 views

Iterating over layers to export data as a CSV

I'm trying to export particular columns of data from the attribute table to a CSV, I've added in a functionality to remove the excess commas to make this easier so that I end up with two neat columns ...
0
votes
1answer
110 views

Using ArcPy GetCount to return number of records for each table in GDB or MDB

This is sample code from Esri import arcpy arcpy.env.workspace = "C:/data/data.gdb" arcpy.GetCount_management("roads") My understanding is this provides the number of records in ...
1
vote
0answers
39 views

Iterating over features in Google Earth Engine

I am using the Zonal Time Series plotter from the LandTrendr scripts to plot an NDVI time series for a geometry. I would like to modify the script to be able to loop through objects in a table, ...
0
votes
0answers
30 views

How to iterate multiple raster dataset to calculate raster in ModelBuilder?

I would like to iterate multiple raster images using ArcGIS ModelBuilder. The Raster Images include Modis13Q1 NDVI and pixel reliability. I want to perform ArcGIS raster calculator to compute the ...
2
votes
0answers
72 views

Iterate Graphical Model over a set of numbers in a non geometric layer

I have built a Graphical Model which, among other actions, extracts attributes of a vector layer by using the 'Extract by Attribute' algorithm. The extracted features are those whose Time in the Date&...
0
votes
1answer
181 views

Iterate a model with Python

I have a model that works well but I can't iterate with a batch process. Therefore, I would like to use a python script to iterate to avoid repetitive tasks. I want iterate my model (that I have ...
0
votes
0answers
22 views

Concatenate from all the elements from a list of lists to have a string [duplicate]

I have data from a JSONs like as below data={'type': 'Feature', 'geometry': {'type': 'LineString', 'coordinates': [[410910.0885459831, 2479395.4132211693, 0.0], [410903.8088855865, 2479401.860380645,...
0
votes
1answer
66 views

Using Spatial Join, Dissolve and Aggregate in ArcGIS Pro ModelBuilder

I am creating a workflow using ModelBuilder in ArcGIS Pro 2.5.2 that will take updated parcel polygons and create/update the Zoning_Parcel (parcels symbolized at the parcel level) and Zoning_Districts ...
3
votes
1answer
93 views

Iterate through dates and through columns using Model Builder of ArcGIS 10.x

I have a point feature class in a geodatabase (approx 11000 features) with 366 columns. From these, one represents the targeted date and the other 365 represents the temperature of one day of the ...
2
votes
1answer
106 views

ModelBuilder Collect Values output values to a table?

I am working with Build Balanced Zones tool in ArcGIS Pro, which uses a genetic algorithm to find an optimal solution to a spatial problem (such as creating zones with equal population). It uses a ...
0
votes
1answer
40 views

Combining layers and changing fieldnames in Arcgis Pro ModelBuilder

I have layers containing polygons. The difference between the layers are the periods of the year about which the layers have information. So layer 1 is called Lawn_p1 and layer 2 is called Lawn_p2 (p ...