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 [list]

Linear collection of items

0
votes
2answers
14 views

If field 1 > field 2 update field 3 in loop

I am trying to update the table above. What I want to do is if the values in the PMP fields are less than the Max fields update the check fields with PASS, if not FAIL. I started doing this trying ...
0
votes
1answer
18 views

Earth Engine get dates from imageCollection

I try to get all acquisition dates of my ImageCollection in Google Earth Engine Code Editor. var begin = ee.Date.fromYMD(2017,1,1,'Europe/Berlin'); var end = ee.Date.fromYMD(2018,1,1,'Europe/Berlin');...
1
vote
0answers
29 views

Exporting string and float variables to ASCII file using ArcPy?

I am trying to create a script using arcpy to automate a serie of task in ArcGIS. What I am trying to do is to interpolate rainfall data from a region and then, using hydrological basinshapefiles, ...
1
vote
1answer
35 views

Creating drop-down list from dynamic field values in ModelBuilder?

I am trying to create a drop-down list containing all the values from a particular field, that I can use as an input for the Select by Attributes tool in ModelBuilder. The answer I’ve seen to ...
1
vote
1answer
60 views

Google Earth Engine, get a List of Bands

I want to Automate Band selection for all bands. Therefore a List of the Bands is needed. This didn´t work: ee.List(image.get('bands'))
0
votes
2answers
28 views

Raster operations in a raster list in R

I have a raster list (21 in total) S1 that have the same projection, resolution but not exactly the same extent. Due to this difference, I cannot stack them without solving the extent/dimensions ...
0
votes
1answer
34 views

Use two lists as input to Spatial Join in ArcPy? [closed]

I am trying to determine a method for conducting a spatial join on features from two separate feature datasets based on the first three letters of each input feature (A01_road == A01_gps). import ...
0
votes
0answers
65 views

numpy array coordinates to polyline in shapefile Python

I am calculating the shortest path in a numpy array which was converted from a raster (.tif). I have a list representing a path like [(1,3),(2,3)(3,3)]. How can I transform this into a polyline in ...
1
vote
2answers
532 views

Arrange pair of coordinates in Python lists [closed]

I have these coordinates of a bounding box in this format: (51.901071, 7.543488, 52.002215, 7.692406) and I want to convert it into a list of coordinates so that I can iterate through the pair. The ...
0
votes
0answers
75 views

Getting attribute data from a GeoJSON file

I have a JSON file that I am trying to pull specific attribute data from. Before the data is turned into a file, it is first held in a variable like this: params = {'f': 'json', 'where': '1=1', '...
1
vote
1answer
118 views

Export arcpy.ListFeatureClasses to txt for later use

I have to re-project all Feature classes of a very large .sde. In order to iterate through the whole .sde I'm using arcpy.ListFeatureClasses. Getting all Feature classes into the Feature class list ...
0
votes
2answers
66 views

Getting “TypeError: expected raster or layer name” when input is raster [closed]

I have a script that adds output rasters' paths to a list and that list is used to loop through each input in a later module. I am getting the following error: TypeError: expected raster or layer ...
1
vote
1answer
499 views

Unique List of Image Dates from Image Collection in Google Earth Engine

I would like to create a list or array object containing a unique set of dates represented in an image collection for a given region of interest. I have a function that extracts and converts dates for ...
2
votes
1answer
65 views

PyQGIS equivalent for ArcPy ListFields

I just started using PyQGIS and I am not familiar with many of the commands. In ArcPy, you can use the command arcpy.ListFields to print out the fields present in a shapefile. I'm wondering if there ...
0
votes
1answer
95 views

Listing all points in polygon geometry using ArcPy? [closed]

Based on my understanding in coding, I thought the following code will list me all points in every polygon in workspace: arcpy.env.workspace=r'D:\test.gdb' rows=arcpy.da.SearchCursor("Building","...
0
votes
1answer
75 views

Getting “mismatched type for band” error in Google Earth Engine?

I have extracted a list of images from an iteration (using Google Earth Engine how can I return an image for each iteration) but I keep getting an issue when I try to add these images to an image ...
1
vote
1answer
134 views

Using SelectLayerByAttribute with list of values in ArcPy?

I'm fairly new to python, so I'm having a little trouble with this. I want to iterate through a list of values, select the list values from a feature class, select from another feature class that ...
0
votes
1answer
57 views

Creating separate list of x and y coordinates from array after using getPart?

I have an array of points by using getPart on each of the four polygons in the shapefile. I am trying to figure out a way to create a list of x and y coordinates in my for loop and name them xCoords ...
-2
votes
1answer
35 views

Converting lists into values using ArcPy?

Here is the code that I have. I run this code and it gives me the following error: "TypeError: value#1-unsupported type: list". I am having a hard time getting it to be formatted so I am attaching ...
1
vote
0answers
83 views

Filtering elements of FeatureCollection using fusion table that contains list?

I'm new to Google Earth Engine. I am trying to filter all countries in the Americas from a Fusion Table that contains all countries in the World: // Load countries var countries = ee....
3
votes
0answers
76 views

Grouping and sorting a list of equipment using an aggregate function in the print composer

I'm using QGIS as a spatial database for a construction site and we are now checking the installed equipment. The inspection requires us to have a list of the equipment ID to inspect for each type of ...
2
votes
2answers
45 views

Defining Python List of Many values

I want to iterate through a layer that has about 500 records. In my code, I'm using a definition query inside a for loop to iterate through a test list: listx = [1,2,3,4,5] My question (probably an ...
1
vote
0answers
134 views

setAttributes() with list values

In a script on PyQGIS, after a FOR cycle, I obtain a LIST like: LIST:, [[[0], 0.035, [0], [0], [0], [0], 0.036, 0.031]]) I need to put that values in the column of Shapefile Attribute Table, but I'm ...
2
votes
1answer
33 views

for list not working [closed]

I'm trying to drop the .shp from my list but when I do and print, I am only seeing the last one. When I print the list from ListFeatureClasses() I am seeing all of them. Any thoughts? Here is the ...
0
votes
1answer
32 views

Passing a Python List to GeocodeAddresses

Currently I have a list of locations, like the following: locations = ["Atlanta, GA", "Rochester, NY", "Paris, France"] I would like to geocode these locations using arcpy.geocoding....
1
vote
1answer
55 views

Why doesn't anything happen in using QgsRasterCalculator on a list?

I have a list of raster layers that I want to do a calculation on each layer with QgsRasterCalculator. My code is: lstLyr = self.readRasters() for layer in lstLyr: registry = ...
5
votes
1answer
1k views

Google Earth Engine: Extract values from FeatureCollection as list

I'm trying to extract values from a FeatureCollection as a list. Here's some example code that I'm using in Earth Engine's code editor: var viirs = ee.Image('NOAA/VIIRS/DNB/MONTHLY_V1/VCMCFG/...
3
votes
0answers
87 views

Resolve getting a sorted list when using 'getFeatures()' method

I have this code which allows to insert features in a list: liste = [] for b in layer2.getFeatures(): for a in layer1.getFeatures(): if a.geometry().intersects(b.geometry()): ...
1
vote
1answer
174 views

Sum new values to existing attribute values in PyQGIS?

I'm trying to sum new values from a list in one loop to the existing attribute values (not in a new column, but in the exiting attribute values itselfs). def radiusDivider(dist): try: itlayer = ...
2
votes
1answer
230 views

listing multiple files for a merge (arc)python

I have created a script to convert GPX into features with python. This script works but now I want to add all these separate feature classes (point features) in one featureclass/layer and convert it ...
0
votes
1answer
319 views

Leaflet routing machine Origine to destination

I want to do routing from a point to another the points are listed in legend control .the data retrieved from listbox does not work with routine machine may be because of type compatibility. var ...
1
vote
3answers
137 views

Need to get spatial data from tab-separated list into csv or similar

I am trying to download spatial data (points) from a site that offers it in two forms: a KML and a tab-separated list. Unfortunately when I download the KML file, the attributes table is basically ...
6
votes
2answers
236 views

Understanding *coords meaning when used with ArcPy?

What does *coords in the following code mean? import arcpy feature_info = [[[1, 2], [2, 4], [3, 7]], [[6, 8], [5, 7], [7, 2], [9, 5]]] features = [] for feature in feature_info: ...
1
vote
1answer
46 views

Associating a list with polygons?

I have a shapefile with different polygons (basins) and a table with a list of species indicating the polygon name where they belong. I would like to know if there is any way to associate the ...
3
votes
1answer
384 views

How to Geocode a list of address into a map in qgis?

I have a list of country and city capitol on a Excel, and I want to upload them into a map in QGIS?
0
votes
2answers
277 views

Selecting table records by attribute if in Python list

I would like to create a subset of a table based on values in a Python list that I created from a search cursor. I have not been able to get the where_clause correct and keep getting errors. Here is ...
3
votes
2answers
202 views

arcpy.ListDatasets will not read CAD files as datasets

I am essentially running this script but for my own data. The problem I am having is that the ListDatasets command is not recognizing the CAD .dwg files as datasets (as it should). It returns a 'None'...
2
votes
2answers
656 views

Adding values from list to field in feature class using ArcPy?

I have the code below. fc is a shapefile. I add a new field called "RANK". I want to populate the RANK column with values from Final_Rank list. Fortunately, they are of the same size. Field RANK has ...
0
votes
1answer
145 views

Creating a list of Rasters from another list of Rasters based on file name?

in Arcpy trying to create a subset of rasters from a list of rasters. Basically the idea, run arcpy.ListRasters on a geodatabase, check all raster names for a user input value, then add those rasters ...
0
votes
1answer
778 views

Calculate field values using arcpy.da.UpdateCursor

I am trying to create and update a field with a count of line features (tLayer) within a distance of point features (sLayer). I am attempting to use a combination of AddField_management, arcpy.da....
0
votes
2answers
41 views

Update multiple different layer data sources in mxd with multiple lists

I need to update 3 layers in a template mxd then save that mxd. It needs to loop through a fGDB and for each feature, update the three layers then save a copy for each loop. What I have loops through ...
1
vote
0answers
136 views

Remove/hide selected layer and display new layer after click on button

I´m trying to create two drop-down lists: <select id= "select1"> <option value="layer1">layer 1</option> <...
4
votes
2answers
57 views

Method to replace inefficient building of lists using searchcursor

I am new to search cursors, and have them working to build a list of lists - but there must be a better way. Is there a quick way to slice just the three columns (found in field_name_list) that I want ...
2
votes
1answer
87 views

How to use a list of numbers from a spreadsheet.csv field in the query of arcpy.Select_analysis

Have an excel spreadsheet in CSV format with a field of APN numbers (8 digit US assessor parcel numbers) Need to query these in a large layer of parcel polygons using python script and the arcpy....
1
vote
1answer
198 views

Improve performance when iterating features in QGIS and using “for” loops

I am trying to modify attributes of features in QGIS comparing attributes with list'elements. First I define new attributes that need to be completed: layer_intersected.dataProvider().addAttributes([...
1
vote
1answer
91 views

Changing symbology of group of layer from a list of symbology layers with Arcpy?

I'm using arcpy to create a GUI in Arcmap that can import features and apply symbology with importing a list of symbology layers, but it doesn't work and without an error message. for x in range (...
1
vote
1answer
378 views

Making combobox with list of fields (from layer also selected in combobox) in pyQGIS? [duplicate]

I am new to python and pyqqis. I do not have the methods defined in initGUI how do I do? layers = self.iface.legendInterface().layers() layer_list = [] for layer in layers: layer_list.append(...
1
vote
1answer
68 views

Most concise way to check existence of ALL files in a list (ArcPy)?

I'm running a process that includes generating a set of 3 curvature layers. For various reasons, sometimes I may generate just 1, 2, or all 3. Later I may need to go back and generate another layer, ...
7
votes
2answers
219 views

Use list element to build new path

I'm currently trying to build two lists containing folder names, in order to use their elements for geoprocessing tools later on. However I struggle with creating the lists. I'm using ArcGIS 10.3 (...
0
votes
1answer
1k views

Append count of unique values to dictionary keys and then sum the occurrences

I am trying to compare the occurrences of codes from a column within feature classes against a list from a spreadsheet column and then add these to a dictionary where the feature class name is the key ...