Questions tagged [list]

Linear collection of items

Filter by
Sorted by
Tagged with
0
votes
1answer
14 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
35 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
38 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
0answers
40 views

Calculate field with a value in a list based on field

I didn't want to write an if statement for every field. I wanted to know if there was another way to field calculate each field with the values related to it in this example table. Fields (X,Y,...
2
votes
1answer
28 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
27 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
21 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
53 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'...
6
votes
2answers
145 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
45 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 ...
1
vote
1answer
101 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 ...
1
vote
1answer
96 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
78 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
34 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
42 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
27 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
84 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
174 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
54 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
36 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
84 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
44 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
106 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
54 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
9 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
31 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. ...
1
vote
1answer
158 views

How to load an image asset from a list of assets in the folder?

I have a folder in my Assets that contains 44 images. I want to add them to the Map in sequence. However I'm getting an error that I can only create an image that is a constant. var image = ee....
0
votes
2answers
46 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
913 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
1answer
55 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
147 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
583 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
275 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
46 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
150 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
4k 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 ...
1
vote
1answer
123 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
149 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 ...
2
votes
1answer
2k 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
135 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
362 views

Listing All Points In a Polygon Feature Class Using arcPy [closed]

Based on my understanding in coding, I thought the following code will list all points in every feature in my Building polygon feature class: arcpy.env.workspace=r'D:\test.gdb' rows=arcpy.da....
0
votes
1answer
216 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
470 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
96 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
36 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
142 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
1answer
124 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
51 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
223 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 ...