Questions tagged [list]

Linear collection of items

Filter by
Sorted by
Tagged with
3
votes
1answer
63 views

Converting list into field with PyQGIS

I am trying to convert a few lists into fields. I have no problem creating the fields. I just don't have any idea on how to fill them. if result: layer = self.dlg.comboLayerLine.currentData() ...
1
vote
2answers
30 views

FME list index number as attribute value

I have created list which has same road name but several separated segment. These has sorted using length of road lines (ListSorter). The list index inside () shows length order which road segment has ...
1
vote
1answer
41 views

Accessing item in list of lists using Google Earth Engine

How do I access an item in a list of lists in GEE? I know that using the method get() returns the element at the specified position in list. But the result of list.get(0) is [1, 2, 3], and I want the ...
0
votes
1answer
22 views

Adding a property while converting a table into a list in GEE

Is there a way to add a property when converting from a table to a list? I have a table of lat and long points uploaded from a .csv (locTable), and found a GEE code that changed the format of my table ...
0
votes
1answer
90 views

Calculating column mean of array or list using Google Earth Engine

I want to calculate the column mean of the following set of data as the result of 1 row and 7 columns. Which functions should I use in Google Earth Engine or should I write an extra function? var data=...
0
votes
1answer
95 views

Multiply image collection by a list of numbers (pairwise)

I want to know how to multiply every single image of a collection against its respective coefficient allocated in a list. It means to multiply the image 5 with the element 5, image 6 with element 6, ...
1
vote
1answer
27 views

GeometryCollections do not have coordinate lists

I have code that suppose to break multipart geometry into single part by generating list of coordinates for each polygon. The code works perfectly for small amount of polygons, but today when I tried ...
1
vote
1answer
33 views

Delete all files in a directory, except files with a specific string

At the end of my script I want to delete all my temporarily created files in a directory. For this purpose I write all files into a list and look in the elements to see if it has the string "final.shp"...
2
votes
1answer
41 views

Pairing more than two lists using Google Earth Engine

I would like to know how to pair more than two lists. I know this is easy to do using .zip function, but how do I pair a third or more lists? var list1 = ee.List(['...
0
votes
2answers
164 views

Google Earth Engine: How to Create A Table From Lists

I want to create table-format feature collection from a couple of lists. These lists only have 4 elements in it. My objective is to create a feature collection with a column per list and a row per ...
1
vote
1answer
36 views

How to create a FeatureCollection with the values stored in an Array on Earth Engine?

I applied an unsupervised classification to a collection of Sentinel 2 images and used ReducetoVector() within a loop to obtain each class of the Unsupervised classification as a different object. ...
0
votes
1answer
17 views

Optimize the code for one command with only one different parameter

I am not too familiar with ArcPy/Python, but since some commands are only available in ArcGIS, I try to implement my idea using ArcPy. I want to use a command several times, but each time only with a ...
1
vote
1answer
39 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
1answer
37 views

Unlist into a single Object - Google Earth Engine

I'm new to GEE and Java scripts. I'm trying to do something that seems simple, but cannot find any way to do it. I’ve an image (which is not that big, say 100 km * 100 km) with ~ 12 bands (and a 30 ...
0
votes
0answers
14 views

Sorting a list of list in Earth Engine

I'm trying to sort this data set lowest to highest. I have a list of 4 elements, each element is comprised of another list of two element pairs.  I need to sort by the first element in each list and ...
1
vote
1answer
28 views

Dissolve ArcGIS Pro Python doesn't take string variable for field list

I try to dissolve layer having multiple fields statistics calculated. I prepared a string variable which has all the information in it. When I paste printed variable into dissolve it works. However I'...
0
votes
2answers
100 views

Using writeOGR on a list of SpatialPolygons

This question has been asked before, but I find the answer confusing since there are no reproducible examples that link the question and the answer, and the answer doesn't actually use the writeOGR ...
1
vote
1answer
54 views

How to accumulate in the image collection in Google Earth Engine

Here is an image collection [img1,img2,img3,img4,img5]. I want to get List or image collection [img1, img1+img2,img1+img2+img3, img1+img2+img3+img4, img1+img2+img3+img4+img5]. I tried to complete the ...
4
votes
1answer
131 views

Create a new list from a raster list in R

I am very new to R, so this is tough for me to explain. But, I have a raster list made up of 3872 elements (or separate rasters, I am guessing) and I am hoping to make a new smaller raster list by ...
1
vote
1answer
85 views

How to make the data in the list add up in Google Earth Engine

I am new in Earth Engine. Here is an image collection [img1,img2,img3,img4,img5]. I want to get List or image collection [img1+img2 , img2+img3, img3+img4, img4+img5]. I tried to complete the ...
3
votes
1answer
75 views

Insert Cursor Having an Issue With Reading the Syntax of a List

In my code below, how do I get the Desired Output? # Get a list of all 'SITE_NFID' in the dashboard_site_summary table that don't have a match in the nfid_fqn_associations table ...
1
vote
2answers
60 views

Difficulty with select by attributes using list fields in for loop

I am trying to add fields to a table and then populate the fields with text values (Yes/No). The text values are based on whether or not a species was found in a specific block. If the species was ...
1
vote
0answers
53 views

Using Python dictionary as parameter and variable in Python Toolbox tool of ArcPy [closed]

I'm building a feature class merging and comparing toolbox in arcpy, ArcGIS 10.7. I have a working command line utility with fixed featureclass values, and now I'm building this toolbox, I just copy ...
0
votes
1answer
103 views

Rasterize vector based on list values in Google Earth Engine

I would like to convert polygon (as featurecollection) that has the attribute 'Name' which contains string value of plantation types, namely 'Rubber', 'Mango', 'Coffee'. However, the .reduceToImage ...
0
votes
2answers
99 views

Using list of file paths in function arcpy.ListFields to create multiple lists of field names for each shapefile

I have a list object that contains file paths as text. I named the list object filepathlist. An example of a file path within the list is C:\TestFolder\Folder1\A\address_pt.shp. The file paths lead to ...
1
vote
1answer
52 views

Copy feature class from multiple gdb to a single gdb

I need to write a Python script that is copying. I want to copy a common feature class of these gdb to a single gdb import os import arcpy arcpy.env.workspace = ("D:/Planchas") workspaces = arcpy....
1
vote
1answer
60 views

Calculate field with a value in a list based on field [closed]

I don't want to write an if statement for every field. I want to know if there is another way to field calculate each field with the values related to it in this example table: Fields (X,Y,...
2
votes
1answer
37 views

Error in create list of the images new names

I have code that calculates NDVI and then give each image name based on the date.I want to create list after that that will contain the names-dates of each image, but I keep getting the following ...
2
votes
2answers
34 views

Is there any way to force a loop to go until the last list object in R?

I am running a loop in R to rasterize a list of data frames and for comparison purposes I have to keep the same list length in the output. I am facing some problems with NULL objects on the list. I ...
1
vote
0answers
206 views

Export landcover area after classification - Google Earth Engine

I want to make a time series analysis of landcover change with Landsat 7 images. After I classified them using MODIS land cover classification, I want to export the change in land use. For this, I ...
1
vote
1answer
101 views

Getting attributes from features in list of another table using expressions in QGIS

The goal seems simple, the explanation not, but I try to: On the one hand, I have a table with several objects ("objects_layer"). On the other hand is a table with a list-field ("list_layer"). I wan'...
7
votes
2answers
486 views

Get all related attribute values from features in list (QGIS)

According to this question: Get Attributes from 1:n relation in QGIS as Expression to use in Atlas I try to bulid waysigns for a hiking-GIS using the QGIS Atlas. The user should be able, to choose the ...
1
vote
1answer
83 views

Spatial reference data from all layers in MXD

I have a MXD with many group which has many layers. I have tried to get coordinate system data from all layers with the code from Iterating through layers in mxd and describing coordinate system. So ...
2
votes
1answer
219 views

ArcPy - List layers and list fields in one code

I am trying to combine ListDataframes, ListLayers and ListFields in one ArcPy code. I can do it one by one (first list layers in one code, and then list fields in second code), but I am trying to do ...
2
votes
1answer
756 views

Exporting Lists from Earth Engine

I am using code from the emapr lab to learn to use LandTrendr to get mean NDVI values per year for a geometry. I am trying to export the generated list from earth engine to Drive. The list only ...
1
vote
0answers
130 views

Get coordinates of all pixels in a raster [closed]

I have a georeferenced raster and I need to extract a list with the coordinates of pixel in reference system (EPSG:32631) and the coordinate of pixel in raster reference. I want a list like this (...
0
votes
2answers
81 views

Cell Statistics Error 000864: Overlay statistic: The input is not within the defined domain

I am trying to find the sum of a list of rasters using Cell Statistics in ArcPy. I am getting the following message: 'ERROR 000864: Overlay statistic: The input is not within the defined domain.' I ...
1
vote
1answer
53 views

Subsetting single raster from raster list using ArcPy?

I have a list of rasters, created by arcpy using ListRasters. Rasters are stored in a geodatabase. How can I subset only one raster of the raster list? The goal is to make a new list, but containing ...
0
votes
1answer
34 views

Selecting columns in from an attribute table in ArcPy using a list (rather than slices or indices)?

I have seen this answer to Calling specific columns of attribute table using ArcPy?, but it uses a slice to select columns. I would like to select them using a list. Example code that doesn't work: ...
1
vote
1answer
33 views

ArcPy search data from a list of values

I have a list WRL_ID = ['NW-E8-105151', 'NW-E8-105138'] and I am trying to search these values in a field called ID. If the value exist, print 'It's in SDE', if not, print 'Not in SDE'. Right now ...
0
votes
3answers
316 views

Concatenating list of strings using ArcPy?

My code from Returning strings showing all vertices from all polygons in shapefile using ArcPy? creates is the following: import arcpy fc=r'D:\GIS Data\TOOLS\EV calc in Python\Data.gdb\PolyWGS842' ...
2
votes
1answer
188 views

Returning strings showing all vertices from all polygons in shapefile using ArcPy?

I want to have a string showing all vertices from all polygons in a shapefile. In my example below my code lists all vertices and the first column shows the polygon they are part of (I only have 2 in ...
2
votes
2answers
128 views

FME-SQL where ID in id.list

I extracted and transformed worksite records from a Oracle dB and stored them in a PostGIS dB. There are about 700 worksite records having a unique ID. I need to extract additional worksites from the ...
0
votes
1answer
80 views

Split list by chunks Earth Engine with mean

I am calculating mean temperature data based on historical data. I need to calculate the mean through the years (jan-jan-jan-jan...) and the means within a year (jan-feb-mar-may-jun...). This is ...
0
votes
1answer
232 views

List of small lists in Python: How to retrieve items from small list in a loop?

I would like to automate the process of making some certain feature layers. I made a list of lists that goes like that: [[feature class, subtype],[feature class,subtype],...] I'd like to loop ...
1
vote
1answer
56 views

Using Python Lists in Calculate Field Code Block? [closed]

I'm looking for some help in explaining what exactly is occurring with the following code: MaterialLife = "LifeMaterial(!"+Material+"!)" codeblock2 = """def LifeMaterial(mat): material = {"ABS":...
0
votes
1answer
213 views

arcpy.da.SearchCursor storing data in a list with a query

I am currently working with a database that hold street names, x and y coordinates and many more fields. I would like, through a search cursor, to store the x,y coordinates in a separate list for ...
0
votes
1answer
123 views

Google Earth Engine: Extract rule based values from List and Array

I'm wondering how to extract values from a ee.List and ee.Array that meet a certain criteria in the Google Earth engine environment. var array1 = ee.Array([1,1,2,2,3,3,4,4]) var list1 = ee.List([1,1,...
1
vote
1answer
10 views

No visable Difference between two Lists for Visualisation via Palette creating an Error

I want to Visualize a Landcover Classification I have different success with seemingly identical Lists. List 1: Pallette Parameters inside the Code like: var landcoverPalette1 = [ 'E6004D', //...
0
votes
1answer
34 views

Selection by attribute from list

I need to select a layer with all attributes while the selection comes from a table. With my code I get only empty feature classes and emtey Excel files. The tab_list Elements are the selection value. ...