Linear collection of items

learn more… | top users | synonyms

1
vote
1answer
38 views

Field list in combobox in pyqgis

I'm new to pyqgis and I'm tryig to make a combobox with list of fields (from layer also selected in combobox). layers = self.iface.legendInterface().layers() layer_list = [] for layer in ...
10
votes
6answers
1k views

Is there a faster way in python of finding the smallest number in a field?

Using arcgis desktop 10.3.1 I have a script which uses a search cursor to append values to a list and then use min() to find the smallest integer. The variable is then used in a script. The Feature ...
1
vote
0answers
13 views

Append object from another layer to the new layer through form (drop-down list)

I'm trying to get to know is it possible to append object from another layer to the new layer through form (drop-down list)? Do I need to create an application? If yes please tell me what language ...
1
vote
2answers
57 views

Append daily rasters to monthly lists in Python Arcpy

I'm trying to go over a folder of geotiff rasters where the last three digits of the raster name is the julian date and I want to append the correct days to monthly lists (Jan-Dec) and then run Cell ...
2
votes
2answers
75 views

Creating a list using an attribute query with arcpy.da.SearchCursor

I have a shapefile of a river network containing the following fields: toJunction, fromJunction, Int_DAM (which indicates free-flowing status) and Strahler. I'm trying to create a list of the rows ...
1
vote
0answers
40 views

Looping through CSV files to write Lists [closed]

I am very new to Python and am attempting to use it for some relative humidity data. I am looking at 60 months of data. The files include a Lat and Long file (CSV in a Matrix) and Relative Humidity ...
2
votes
1answer
702 views

QGIS 2.14 GRASS geoalgorithms don't work?

I instaled qgis 2.14 and grass geoalgorithms dont work. Only 160 geoalgorithms and should be 168. MsBox: Missing dependensy, It seems that GRASS is not correctly installed and configured in your ...
0
votes
1answer
35 views

Arcpy - LayerList - Count/Length [closed]

I use arcpy to load all layers in the current map document, and I need all layers but not the last one (this is my layer for the symbology template). How can I access the length or count of the ...
3
votes
1answer
60 views

How to slice a list based on row values? [closed]

I'm working with python 2.7 (quite a beginner). I have a list, and I have a feature class with : A = a field that contains values that I would like to use as the start of the slicing B= a field that ...
0
votes
1answer
31 views

How to slice all elements in a list to a certain length [closed]

Assuming I have a list with multiple strings in there. x = ["red", "green", "black", "orange", "purple"] I want to slice every element in the list to a certain length, eg. 4 characters. Then the ...
3
votes
1answer
134 views

Append List not working

Trying to create a list of well counts. In the code below, wellCntList only contains the current county count and not a list of ALL the counts. Sure I'm missing something simple. for cname in ...
1
vote
1answer
96 views

Store into a list multiple lists

I have list of 50 lists of pairs of SpatialLinesDataFrames. That means I have something like: [[1]] [,1] [,2] [,3] [1,] spldf1 spldf3 spldf5 [2,] spldf2 spldf4 spldf6 [[2]...
0
votes
0answers
79 views

Extracting multiple values from list and storing them in data frame using R?

I have a list of 3 SpatialPolygonsDataFrames. Every element has a number which is the perimeter. I want through a loop to store the numbers into one cell of a data frame like: 154,526,442. I tried to ...
0
votes
1answer
49 views

Listing geodatabases in local SQL Express Workgroup ArcSDE using ArcPy/Python? [duplicate]

I would like to create a list of the multiple geodatabases that sit in my local SQL Express Workgroup SDE server. I have set up a connection using the "Database Connections\Connection to ...
2
votes
1answer
97 views

Determine the number of fields of a certain field type there are in an input feature class

So I am wondering how to get the number of field types "String" by creating a custom function? Can anybody point me in the right direction? I have a shapefile named streets and there are 73 field ...
6
votes
2answers
622 views

How can I turn a python list into a table?

I am trying to create a table of coded values so each textual description has a numerical attribute. The order of numbers is not important - they just need to be unique. What I have so far is a ...
0
votes
1answer
227 views

Listing Feature Classes, Geometry Types server and user names from a parent directory in Python in ArcGIS

I have parent directory containing subfolders with layer files (.lyr) and I want to list Feature Classes, Geometry Types, server and user names for these files. Also I need Python to scan these files ...
0
votes
0answers
20 views

Arcpy connect to folder [duplicate]

Would anyone know if there is a way to automate (in arcpy) Arcgis's Connect to Folder function from a list of directories? What I am after is an automated process to take a list of directory file ...
2
votes
1answer
91 views

Calculate Row if Row Value Equals Value in List

I have a folder of photos named with a building ID that corresponds to a building ID in a building footprints feature class. Not all rows in the footprints feature class have a corresponding photo. So,...
3
votes
1answer
182 views

Why does arcpy.ListFeatureClasses() take so incredibly long?

I'm having an issue where calling arcpy.ListFeatureClasses() in a workspace with 400 shapefiles takes a very long time (more than 10 minutes). Using the os module to achieve the same effect takes ...
2
votes
1answer
160 views

What is the purpose of arcpy.Array()?

I am wondering what the purpose of arcpy.Array() is. It seems an intermediate step between creating a list of objects and performing some sort of conversion, for example, such as in the sample code ...
1
vote
2answers
238 views

Creating tool in Python toolbox to export field list to Excel?

I am creating my first tool in a Python Toolbox (*.pyt) to export a list of fieldnames to Excel. I have the following bits of code: import arcpy class Toolbox(object): def __init__(self): ...
1
vote
3answers
437 views

How to copy entire fields into a python list

I'am trying to find a way to copy entire fields(columns) in a feature class attribute table as lists inside a master list (python). To illustrate it, consider the table below: So the list should ...
0
votes
1answer
36 views

Using a list to access database from a layer

I am trying to access the database using a list in order to put it in a loop but I can't make it work. I want to replace the months with a list variable. This is the hard core example: arcpy....
0
votes
0answers
103 views

Layer Tree Collapse Alongside OpenLayers3

I have the following JSFiddle that includes a layer tree for my OpenLayers3 map. It is currently set up so that when you click on the branch 'parent', the layers collapse. I'm looking to make it so ...
1
vote
1answer
67 views

Multiply two lists of raster from two subfolder

I have two subfolders, which contains rasters for each country but which express different variables. I am trying to figure out a way to Loop a multiplication of each raster into a folder with its ...
0
votes
1answer
24 views

Clipping Features in list creates error

I need to clip all of the feature classes in the .gdb to a layer then add the results to a results dataset. However it returns the error. "Error 000210:Cannot create output C:...gdb\FC_Results\...
1
vote
1answer
118 views

Add layer to mxd files ignoring specific item- arcpy

I try to add layer (abc) to several mxd files with arcpy and ignoring mxd file which called "land use" . I work with arcview 10.3 : import arcpy,os,sys,string,datetime import arcpy.mapping from arcpy ...
0
votes
2answers
881 views

remove values in list using logical operators

Just would like to ask how can I masked or remove the values in my list based on logical operators. Here is the case: I converted an NDVI.img file into a 1 dimensional array. and as part of the ...
1
vote
2answers
351 views

Multiply Rasters from two subfolders

I have two subfolders with Rasters named with the same parameters. I am trying to figure out a way to Loop a multiplication of each raster into a folder with its pair of the other subfolder. Looks ...
3
votes
1answer
193 views

How do I update common fields in multiple feature classes with ArcPy?

I have a piece of code that I can use to update several fields in a specific feature class. I would like to use this code to update all of the feature classes in the data set. The data set would ...
0
votes
1answer
409 views

export list as shp in R

I have a list of coordinates with which i can create a path and I want to export this list as shp. I have "shapefiles" package but I didn't find the way to do this. Is there a way to do this with this ...
1
vote
1answer
171 views

Returning list of field names in joined table using ArcPy?

I need to look at all the fields in a joined table performed through arcpy. I am instigating for fields in arcpy.Listfields(Feature): print fields but it is returning a large list of: <...
2
votes
2answers
314 views

How to make a list of ESRI GRID rasters in Python

Tipically, ESRI GRIDS are not defined by a file extension like for the .tif files, but they are stored in a info folder plus an extra folder corresponding to the name of the raster. Arcpy allows to ...
3
votes
1answer
291 views

Error message trying to merge Shapefiles in Python

I try to merge all Shapefiles from one folder together into one, using this: shapeList = arcpy.ListFeatureClasses() print shapeList for fc in shapeList: if fc == "*domain*": arcpy....
1
vote
1answer
88 views

Can't solve “list out of range”

I'm using arcpy in ArcGIS 10.0. My code is supposed to test the intersection between all layer in a geodatabase by group of 2, and if so, erase one feature of each couple by the other depending on a ...
2
votes
2answers
110 views

Get feature from list

I've done this: while (feature != null) { if ((feature.get_Value(feature.Fields.FindField("NAME")) != null) && (feature.get_Value(feature.Fields.FindField("NAME"))....
0
votes
2answers
54 views

ModelBuilder and Delete fields

I like to know if there is a solution to the following problem. I currently have a simple ModelBuilder workflow in which includes a list of shapefiles being copied. Within the workflow, once copied, I ...
3
votes
1answer
471 views

Creating multiple Feature Datasets from table/list using ArcPy?

How to Create multiple Feature Datasets from a table/list. I can create a single feature dataset in a geodatabase with this Python code. import arcpy from arcpy import env env.workspace = "I:/python/...
1
vote
1answer
43 views

Short list of .prj options in .pyt

I'm tasked with creating a .pyt to distribute across our office and field computers (state geological survey) for converting .gpx to features but constraining the choice of projections/datums to seven ...
7
votes
2answers
2k views

Using multiple wildcard parameters with arcpy.ListFeatureClasses

I know there has to be a way to do this but I'm having trouble figuring out how to do so. I would like to create a list of feature classes to perform operations on however, I want to have the list ...
1
vote
1answer
61 views

how to separate a list of features from its shapefile_

I tried to copy all features in a list of dictionaries. the code looks as follows: def iterate_features(self): feature_set = arcpy.SearchCursor(self.address) for feature in feature_set: ...
1
vote
1answer
283 views

Arcpy: List to point feature class

I have a list of lists that contains: [vala, valb, valc, vald, (pntx, pnty)] [vala, valb, valc, vald, (pntx, pnty)] [vala, valb, valc, vald, (pntx, pnty)] I also have a list of the field names that ...
0
votes
1answer
140 views

Creating a loop for Lines data (spatial data)

I am trying to build a lines shapefile with the contour lines from the 20 meters isobath from along the East African coast. This contour line of 20 meters has different segments and I have this ...
3
votes
2answers
972 views

finding the index of a field with its name using arcpy

I wan to extract the index of a field with its name using arcpy. it seems what I have written is so dumb. is there any simpler method with out using for-loop. import arcpy fieldList = arcpy....
0
votes
1answer
83 views

converting a python list to arcmap table [closed]

I have values stored in a list that need processing in the costDistance tool in ArcMap 10.2 (desktop). For this they need to be converted into a table or file readable by arcmap's tools. Anyone with ...
4
votes
3answers
4k views

How to extract data using arcpy.da.SearchCursor

I have a shapefile of point features showing fire locations in a given year. One of the fields is named "YYYYMMDD" and indicates the corresponding date that that fire happened. In Python, I am trying ...
4
votes
1answer
2k views

How can I rename multiple feature classes (each different name) using Python?

I have a geodatabase including (cnty06,cnty07,cnty08,cnty09...) that I'd like to rename to (c06,c07,c08,c09...). I can use the ModelBuilder (or script from ModelBuilder) to complete this task. Is ...
3
votes
1answer
3k views

Adding bullet points to text boxes

I need to be able to add bullet points to a text box so I can display a list on my map. The work-around that I tried was to format the font differently and use a Wingdings character that looks like a ...
-1
votes
2answers
80 views

Creating a list in Python and emailing the list [closed]

I am literally BRAND NEW to python and in my current role it is not a hardcore requirement, but knowing my way around a script will make life much easier. I am working in an ArcGIS Server environment, ...