Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [iteration]

The tag has no usage guidance.

2
votes
1answer
29 views

Using Iterate Feature Selection in ModelBuilder causes entire model to iterate?

I'm creating a fishnet on ModelBuilder, the extent of which is based on an Input raster. The output of "Create Fishnet" is gone through an Intersect tool, and then is fed into an Iterate Feature ...
1
vote
0answers
20 views

Select Feature Based on Iterate Row Value in ModelBuilder

I have a table showing commuting trips from home to work. home_id represents home and work_id represents work. Now I want to step through the trips table using Iterate Row Selection in ModelBuilder, ...
1
vote
0answers
16 views

Extracting field values to Excel by iterating in ArcGIS ModelBuilder?

I have a database with a lot of feature classes containing shapefiles. What I want to do is to use ModelBuilder in order to iterate through all the feature classes and for each feature class go ...
0
votes
1answer
69 views

Iterating folder of shapefiles using ArcPy and exporting mxd to PDF

I'm new to Python and just created a hard coded script for the process I want, and it works. Right now it calls on the one of three shapefile I have in this map document. I want it to do the same ...
0
votes
1answer
38 views

Using %Name% variable dynamically with selection tool in ArcGIS ModelBuilder?

In ArcGIS ModelBuilder is it possible to use a %Name% field value from iterated features in a query and, if so, what syntax should I use?
1
vote
1answer
38 views

RuntimeError: General function failure when running arcpy.da.SearchCursor

I have a script that was previously working but just started throwing an error out of the blue. Here is the traceback: Traceback (most recent call last): File "<ipython-input-68-be384b1c4968>...
3
votes
1answer
52 views

File naming iteration QGIS modeler

I am attempting my first use of the modeler from the Graphical Modeler from the Processing menu in QGIS. I made a simple model for cliping species data by sanctuary.It has two Vector Inputs, uses some ...
0
votes
1answer
31 views

Running iteration at end of another in ModelBuilder?

I would like to run two iterations. One assigning the respective attributes from the polygon file containing the cols and rows. And after that iteration another iteration that selects all of those ...
0
votes
2answers
64 views

How to iterate through date and time text file, line by line?

I am building a model on ArcGIS and I am now trying to iterate through a text file that contains in each line date and time information. I tried to do that on Model Builder, only I used the get field ...
1
vote
2answers
71 views

How to extract multiple polygons from a layer that overlap with a point?

I would like to get attributes of polygons that overlap with a point. This is to see on which street the lanterns are located, so if they are on a crossing I want to get both streets. Right now I can ...
0
votes
0answers
15 views

Intersect five different points of same layer

In ArcGis Desktop I have the following problem: I have a layer of sites, let them be hotels, for instance, and I want to find each place, where there are less than five hotels within a radius of 30 km....
1
vote
1answer
99 views

How to iterate through a list of polygons' centroids in QGIS

I'm the new one. I try to calculate the azimuth between a row of polygonsheets to print the number of the last and the next sheet inside the sheet in direction of the last and the next sheet. This ...
1
vote
0answers
203 views

Creating FeatureCollection from imported assets in Google Earth Engine? [closed]

I have imported several shapefiles as a Fusion Table in Google EE. My goal is to calculate the amount of forest loss (from Hansen et al) and the MODIS VCF (percentage tree cover) for each shapefile, ...
4
votes
4answers
216 views

Problems with for iteration in arcpy

I want to fill a new field in a shapefile using arcpy. I have differents values so I am using for iterator to run all rows. But when I run the code all rows are filling with the latest row value. The ...
0
votes
0answers
80 views

Interpolate Multiple Data With Kriging In ModelBuilder?

I am having problems building a model for running interpolation on multiple data using the Kriging method. I have followed these steps: Convert multiple data to geodatabase file Used iteration on ...
0
votes
0answers
27 views

Adding median values of several rasters (geotiff) to each fishnet polygon (200x200metres fishnet) using ArcGIS ModelBuilder?

I have a 200x200metres fishnet of my study area, with a few attributes in it, like land use, percentage of each landuse class. Now I need to add the median value of more than 10 rasters to the ...
0
votes
1answer
26 views

Trying to build a model to get all layers(same name, different folders and different geodatabase) into one

I have over 3000 folders, each folders have a geodatabase and each geodatabase consist of a layer name called "lot". I want to merge the all the "lot" layers into one layer shapefile, my gis ...
0
votes
1answer
28 views

Batching field calculations and feature classes in feature dataset using ArcPy?

I'm working on writing a script that will calculate facility ID's for feature classes in a feature dataset. Is there a way to do this without making feature layers and doing select/field calculate ...
2
votes
0answers
18 views

How to take all active layers as input for an iterative algorithm?

I have a whole list of different layers I want to do a iterative clipping algorithm on. (Batch processing is not an option as the 'iterate' button is gone.) This is a follow up on my question here. ...
0
votes
0answers
170 views

How to iterate and display each image of a collection in Google Earth Engine? [duplicate]

I am working on a time-series Landsat collection, and I want to display each image in my collection as a single layer with Map.addLayer(). But I don't know how to use map or iterate function to ...
0
votes
0answers
46 views

replaceDataSource issue when iterating through a loop for multiple map documents

Trying to update data sources across multiple map documents. The first iteration works but fails on the second no mater the order. The input csv is the output from another script that lists unique ...
0
votes
1answer
132 views

Applying batch process with ModelBuilder in ArcMap?

I have done a process in a Model Builder in ArcMap 10.5 version and in order to execute it once over a lot of rasters I have used raster iteration. It works well, but I cannot specify differents ...
0
votes
1answer
50 views

ogr2ogr apply sqlite dialect to multiple feature classes within a fgdb

I have a quite many feature classes in a filegdb and they all have same data schema (same field names and etc). I wanted to apply a single sqlite query and I am having hard time to make a loop ...
1
vote
1answer
31 views

Output extend for raster calculator (setnull set)

We are working on a project to find least cost path for marine shipping based on some criteria. In a phase when iterating raster datasets and using raster calculation to use setnull function to ...
1
vote
2answers
64 views

Spatial join iteration in ArcPy?

I'm pretty sure this is simple. I'm used to just doing a few maps at a time, and manually joining them doesn't take too much time. However, I've now managed to get myself into the situation where I ...
4
votes
1answer
484 views

Mosaicking a Image Collection by Date (day) in Google Earth Engine

I have an image collection of Sentinel-1 data over 3 years filtered by a region of interest that spans 3-4 tiles, and want to know the best way to mosaic all the images (tiles) that were taken on the ...
0
votes
0answers
35 views

Using iterator to merge Excel files into Shapefile with ModelBuilder for ArcGIS Desktop?

Using ModelBuilder in ArcGIS 10.2 I want to iterate through a folder containing .xls-files, convert them to tables, and merge them into one Shapefile. I tried the script Excel To Table, with and ...
2
votes
1answer
66 views

Modelbuilder - iterate consecutive workspaces and select specific rasters from each

This is probably easiest explained with a picture, I'm trying to iteratively perform a calculation using specific rasters from each two consecutive folders in a folder. For example from above picture,...
1
vote
1answer
64 views

Iterator in ModelBuilder does not complete final iteration (last action)?

I am using the ModelBuilder to run an iterative process using the "for" iterator. The entire process is about 7 steps that are iterated several times, depending on the input to the tool (to value, ...
0
votes
1answer
53 views

Creating routes for each feature within feature class in ModelBuilder without coordinate priority?

I´m trying to create a simple model which would select each feature from a FC (streets polylines with vertexes and edges) and transform each of them into a route using the “Create Routes” tool (see ...
2
votes
1answer
427 views

Returning image for each iteration using Google Earth Engine?

I'm trying to map the maximal amount of days without rain using the TRMM dataset in Google Earth Engine. I'm doing this by iterating over the collection and if no rain has fallen, one gets added to ...
6
votes
1answer
580 views

Iterating clip over multiple layers using QGIS?

I have multiple vector layers and a fishnet grid. I would like to clip all the layers based on all features in this fishnet grid. I can use the iterate over layer function in the clip tool, but ...
0
votes
0answers
36 views

Saving raster with input name plus suffix using ArcPy?

I do not how to save properly output rasters. I want them to be named as input raster with suffix. The code is follows: import arcpy from arcpy.sa import * arcpy.env.workspace = "F:/SED/T1" past = ...
1
vote
2answers
49 views

Iterating raster pairs using ArcPy? [closed]

I have a problem that must be solved in automatic manner. I am using ArcGIS 10.2. I have a raster files that I have to pair and then make the calculation. I have tried to use ModelBuilder but there ...
2
votes
1answer
126 views

Using ModelBuilder to run clip scenario?

I am using ArcMap 10.5. I have a layer representing suburbs (n=432) over laid with open space data (both gdb files). My objective is to get to get the suburbs to individually clip with the open ...
1
vote
1answer
48 views

Multiplying files from different folders based on similar date in filename using ArcPy?

I am fairly new to Python and ArcPy. I've been trying to get files originating from different directories and multiplying files from directory a only if directory b had files containing exact same ...
0
votes
2answers
83 views

Using ModelBuilder/ArcPy in ArcGIS Pro to Iterate Field Values of Multiple Feature Classes?

I am using ArcGIS Pro 2.01 for this task. I have 114 shapefiles (each represents a session of the US Congress) which include every congressional district since 1790. I have added a short integer ...
0
votes
0answers
21 views

Creating iteration processing list of rasters, choosing two specific rasters and using them for cut/fill in ModelBuilder?

I try to create a model in ArcGIS Desktop 10.5 ModelBuilder to calculate volumes of sand piles from a construction site. For that I use two input rasters (raster1 and raster2) containing surface ...
2
votes
1answer
51 views

Importing and converting coordinates to ArcMap and calculating distance between them?

I have a table in excel format with the following two columns: Now, I need to import this table to ArcMap and calculate the distance between the two points for each row and write the calculated ...
1
vote
2answers
225 views

Any way to clear selections from features in a map only if they have selected features?

While I know the clear selection tool exists in ArcMap, I am looking to produce a script that would only work if all selections are cleared from the start. I have added lines of code to clear ...
1
vote
1answer
80 views

Iterating/looping through Select by Attributes and Export Data? [duplicate]

In ArcMap 10.5.1, I have 2 feature classes in ModelBuilder; both have a common attribute "Well_Nu." The goal is to loop for each record in the first classes's attribute table and do: 1) Select by ...
1
vote
1answer
241 views

Calculating the inner angle

I have some polygons and I want to calculate the inner angle of each polygon. Now, I have the geometry of every line of polygons in the same attribute table as shown in the following image. I want to ...
1
vote
0answers
34 views

Generate near tables from one layer to all in mxd

I am looking to create a script where user can choose a layer, then find all the layers within a set distance of it. I have set up a script to iterate through the mxd but I keep getting an error for ...
2
votes
2answers
635 views

Iterating over features in vector layer

Im trying to iterate over features in a vector layer following Iterating over Vector Layer: from qgis.core import * import qgis.utils from qgis.core import QgsVectorLayer shapefile = '/media/bera/...
2
votes
1answer
55 views

Substituting inline variables in ArcGIS ModelBuilder?

I want to iterate through a field of a feature class within a geodatabase in ArcGIS ModelBuilder, extracting each group to their own separate feature class within that same gdb. I'd like to append ...
1
vote
0answers
56 views

Iterate a multistep Map Algebra

I am trying to write my first ArcPy script to iterate a Band Math process with requires a few steps. The uniterated, working script for a single group of bands in one Landsat scene is: #import ...
1
vote
0answers
142 views

Finding a more efficient way to execute a long-run python script [closed]

I'm executing a python script which does these steps: iterates through 19 features (makes pairs "each one with each other", order doesn't matter: A-B = B-A) Creates Closest Facility Layer Adds ...
1
vote
1answer
154 views

Failure to Iteratively Calculate Zonal Statistics as Table ArcGIS

I want to calculate mean luminosity for a district using several rasters and a shapefile with administrative borders. Since I have many files, I want to do the operation iteratively using a model ...
3
votes
1answer
1k views

Using Shapely & Python to remove overlapping polygons in one dataset

I am looking for a method using python to remove a large amount of overlapping polygons from one collection. These polygons are grouped together based on imagery collection and have been stored as WKB ...
1
vote
3answers
2k views

Iterate through features to use selection as input for ExtractByMask

I need to iterate through each of the features of a feature class successively to use each one as the mask to extract from a raster with the ExtractByMask tool. Basically I'm looking for the "Iterate ...