Questions tagged [iteration]

Repeated execution of some groups of code statements.

Filter by
Sorted by
Tagged with
2
votes
1answer
113 views
+150

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 ...
1
vote
1answer
59 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
22 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
28 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
22 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
47 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
20 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
38 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
26 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
78 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
52 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
42 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
108 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
49 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
28 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
18 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
29 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
33 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
27 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
26 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
43 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
110 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

Extracting median value of pixels for water areas in each feature in feature collection then exporting to csv using Google Earth Engine

I want to extract out the median value of water pixels from mosaics in the NIR and Red band for three areas in a feature collection, then export it to a csv file with one column being date, the other ...
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
50 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 ...
0
votes
0answers
25 views

NDVI Time Series over Feature Collection of districts

I am very new to google earth engine and I am having trouble creating a time series of NDVI for a feature collection. I am working with the Landsat 8 NDVI Layer "LANDSAT/LC08/C01/T1_32DAY_NDVI&...
0
votes
0answers
25 views

Extracting the current feature in QGIS modeler iteration

I have a model that stopped working in the last few versions of QGIS 3.x. It worked fine in the past but now there seems to be an issue with the first step. Basically, the model is supposed to be ...
3
votes
1answer
67 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 ...
0
votes
0answers
23 views

Google Earth Engine: Collecting Region Samples through image collection and merge them

I am using S1 Imagecollection to start a temporal supervised classification. Firstly, I added polarimetric indexes and other data as bands in each image. Then, I filtered the image collection and got ...
2
votes
1answer
61 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
34 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 ...
0
votes
0answers
35 views

Processing multiple TIFFs in ModelBuilder of ArcMap gives ERROR 999999

I am trying to process multiple tiff files using ModelBuilder. I am using ArcMap and specifically the Iterate Raster function (see below). Unfortunately, when I run the iteration I get an error ...
1
vote
1answer
48 views

Iteration in GEE (List Error)

I am writing a code that calculates the number of burned patches in a study area. The process is based on iterating over a list of numbers. Code: Link var country = ['ZA']; var geometry = ee....
0
votes
0answers
14 views

Model Builder - Interation adds correct shapefile and adds another shapfile with _1 to name

I have a model I did not make but am trying to fix and I am newbie. The first error I see is the iterator (I assume that is the cause) is creating the shape file needed but then duplicating it with ...
1
vote
1answer
25 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. ...
2
votes
0answers
61 views

Shortest path (point to point) in iteration

I am using Network Analysis-> Shortest path (point to point) to compute the distance between two points, following a network from OSM. It works like magic for single requests, but I do not seem to be ...
0
votes
2answers
81 views

Using iterator on only parts of model in ArcMap ModelBuilder

I have created a model in ModelBuilder using ArcMap 10.7.1 which is using an iterator. Is it possible to exclude parts of my model from being "iterated"?
4
votes
1answer
106 views

arcpy.SelectByAttribute 'Parameters are not valid' error

I am trying to run a python script to select 5 random points in an attribute table and to loop through every 100 points to do this. When I run the function SelectRandomByCOunt within a python shell, ...
-1
votes
3answers
84 views

ArcPy iterative workflow

I may just not know the terminology needed to find the proper google results but I am trying to count the number of feature classes and store that for reference later in the script so that if the ...
1
vote
1answer
55 views

Create a function with many parameters and apply it over a list in R

I have a list which includes 2 data.frames and would like to apply some analysis to each data.frame. I performed my analysis to a single data.frame and I want to do the same steps over my list. I am a ...
2
votes
2answers
53 views

Iterating GRASS function over list

I want to project the shadows from a DSM raster. Is it possible to iterate the grass function r.sunmask.datetime over a list from a csv file composed with interest dates(month/day) and time (hours ...
1
vote
2answers
104 views

Adding feature class name automatically from overlay layer into attribute of clipped layer while iterating clip

I am trying to clip the road layer to district boundary layer in QGIS using clip and enabling 'iterate' option and I get the clipped road layers of individual districts. Later, I need to add the ...
1
vote
0answers
123 views

Iterate raster data error 00964

I'm building a model in arcmap 10.7 model builder to determine zonal statistics for multiple raster in a geodatabase. The model works, but only when i run it through model builder. When I try to run ...
0
votes
1answer
44 views

Iterate through table to do geometric calculation

I've got two tables: tableA holds the objects with it's geometry tableB holds holds pairs of two objects (ids, each in a separate column) from table1 Now I want to calculate the concaveHull for ...
1
vote
0answers
278 views

To Iterate through all layers and all attributes for each layer

I am working in the Python console in QGIS 3.10. I want to iterate through all layers and for each layer iterate through all attributes and set them all to 'Hidden'. I want to do this in ...
2
votes
0answers
53 views

Model Builder ArcGIS - Export topology errors (Iteration Tool)

I was wondering if there’s any option to iterate export topology errors in ArcGIS model builder. My GDB Topology errors has all topologies within the same Topology dataset but model builder seems not ...
0
votes
1answer
85 views

Collecting and merging Service Analysis Line features using ArcGIS Pro ModelBuilder

I try to collect and merge Service Analysis Line features after iteration. I name my analysis layers with the iteration values, but it doesn't help. The output feature datasets of the analysis named ...
0
votes
1answer
91 views

Export dimensions of NetCDF as individual rasters in ArcMap

I have a NetCDF file in ArcMap that I created using the Make NetCDF Raster Layer tool. The band dimension of interest is the variable "time", which has 316 grids. I need each individual grid as its ...