Linear collection of items

learn more… | top users | synonyms

3
votes
1answer
106 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
50 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 ...
0
votes
0answers
37 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
22 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
46 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
415 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
125 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
67 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. ...
3
votes
1answer
119 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
106 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
176 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
198 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
35 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: ...
0
votes
0answers
31 views

Attribute Table Column to Python List (QGIS 2.0)

I have a column of strings in my attribute table and I want to create a list out of this column. How can I do this? my attribute column of interest (CompanyNam) looks like this: Eva Ela REW Scot ...
0
votes
0answers
63 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
54 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
23 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 ...
1
vote
1answer
106 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
397 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
252 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
138 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
306 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
113 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
213 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 ...
2
votes
1answer
187 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*": ...
1
vote
1answer
78 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
95 views

Get feature from list

I've done this: while (feature != null) { if ((feature.get_Value(feature.Fields.FindField("NAME")) != null) && ...
0
votes
2answers
47 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 ...
2
votes
1answer
387 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 = ...
1
vote
1answer
41 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
60 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
216 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
95 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 ...
2
votes
2answers
601 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 = ...
0
votes
1answer
73 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
3k 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
1k 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
2k 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
79 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, ...
0
votes
2answers
307 views

How to return the first row of feature class as a list in ArcPy?

I need to return the first record of a feature class as a list. Is this possible? I can't seem to figure it out using row.getValue() as it does not allow me to put a wildcard in there.
0
votes
0answers
150 views

Convert raster_stats list output to array / csv file

I usually program in R, but recently I have started to use python for most of my spatial programming. My python skills are still limited, and please excuse the simplicity of the question. I am ...
1
vote
2answers
609 views

Creating a drop down list in ModelBuilder

I have a model that exports GIS data to CAD. The model has two nested models, the first collects the data to be exported and the other exports it. The export to cad tool has a seed file parameter ...
1
vote
1answer
421 views

Multiply a raster list with a field value list in a FOR loop in ArcPy

I'm trying to create a simple map algebra calculation not managed by ModelBuilder, but writing it in Python is trickier than I thought. I have a list of raster in a GDB and I must multiply them by ...
2
votes
1answer
527 views

ListRasters not recognizing raster files in python

I have 2 rasters in my workspace, one in TIFF Format and the other in GRID format: "C:\ExampleFolder" When I use the python script: import arcpy >>> ...
5
votes
1answer
1k views

How to check if feature class or table contains field with specific name before adding it?

Im trying to write a script that finds out if the shapefile has a specific field and if not to add the field. I get it to show me the field, but the loop goes through each field, so it would create a ...
1
vote
1answer
92 views

How do I use a generic List with my Arc Objects code?

/// <summary> /// Gets a list of all geoms in a Feature Class /// </summary> /// <param name="FClass">The Feature Class</param> /// <returns>a List of ...
1
vote
1answer
967 views

Subquery a list in select layer by attribute management using python

I am new to python and having trouble with my script. I want only the records from the COMTRS field (of the pur_dbf_view) that match values from the ComtrsList to be selected; however, I am getting ...
0
votes
0answers
32 views

arcpy.ListFeatureClasses(wildcard, type, dataset) - Help with grabbing from 2 different feature datasets? [duplicate]

I'm trying to join multiple line fcs to their matching named point. (point and lines in same gdb, but separate feature datasets. stand alone python script/arcgis 10.1) My initial line of psuedocode ...