A site-package created by Esri to expose ArcObjects to Python.

learn more… | top users | synonyms (1)

2
votes
0answers
44 views

how to make a list of features constructing the dissolved feature?

I need to simplify my road network using the dissolve function to remove nodes not occurring on the intersections. the following code is doing that. arcpy.Dissolve_management(self.address_cor_layer2, ...
0
votes
2answers
51 views

Make lists of shapefiles using loop

There are the following shapefiles in workspace. L01-1983_01.shp L01-1983_02.shp ... L01-1983_46.shp L01-1983_47.shp L01-1984_01.shp L01-1984_02.shp ... L01-1984_46.shp L01-1984_47.shp ... ...
0
votes
1answer
55 views

Splitting the job on Arcpy SearchCursor

I'm running a for loop with a cursor to disaggregate a large feature class into many smaller ones (of one polygon each). ArcMap crashes after about 1100 iterations, and I am trying to break the job ...
2
votes
1answer
57 views

Merge Shapefiles using a loop

I'm a new user of ArcMap. And I'm not good at programming language. There are the following shapefiles in workspace. L01-1983_01.shp L01-1983_02.shp ... L01-1983_46.shp L01-1983_47.shp ...
0
votes
1answer
36 views

Select Layer by Attribute: selection using loops

I'm quite new with python and i'm currently stuck trying to make a loop... I have a shape file of a grid with several fields of different species (more than 150). The values of each record are 0 or 1 ...
1
vote
2answers
48 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 = ...
1
vote
1answer
88 views

Multivalue parameter as text in Python toolbox - reading in to imported module function

I'm building a Python toolbox with a tool which calls specific functions from a custom module. The main input parameter for this tool is a multivalue list of raster layers. In the execute block of ...
1
vote
1answer
31 views

python script in toolbox add a button on the window

I am getting stuck when I want to create a new python script in toolbox. The function I want to develop is to let user to input the user ID, then retrieve from the database the other values to allow ...
1
vote
2answers
73 views

Min/Max values from a feature class

I am very rusty/inexperienced in python and I was hoping someone might be able to give me some pointers on this script. I would like to create a more compact script that prints min and max values of ...
2
votes
2answers
171 views

Convert a Toolbox (.TBX) to a Python script (.PY)?

I have a .tbx tool box, which runs a script that is incredibly slow. So what I want to do is to open the python script that is running below the .tbx and make some changes or perhaps write something ...
-1
votes
1answer
54 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 ...
1
vote
1answer
57 views

How to extract time information from a route analysis

I have a script in Python that solves a really simple route analysis problem (optimal way for given stops). I've found in the documentation that one can assign a start date for the analysis and get ...
0
votes
1answer
40 views

Identifying inserts, updates, deletes, and conflicts between a parent and child version in ArcSDE with ArcPy

I'm looking for a way to identify records that have changed between the present and the last time a version was reconciled. It would also be great to be able to identify conflicting records. Ideally ...
0
votes
1answer
57 views

I'm Having trouble with the Arcpy geometry.disjoint function

I have points along along a line. Points that intersect the segment of the line to return attribute information. My line as three connected segments. ESRI Docs says disjoint (second_geometry) ...
0
votes
1answer
75 views

Loading graph (.grf fle) into MXD using ArcPy?

I have hundreds of pairs of FGDB and associated MXD files. I need to insert a graph in each mxd linked to its corresponding FGDB. No problem creating graph, but stuck on how to get graph into mxd ...
0
votes
1answer
59 views

Obtaining the coordinates of point through arcpy

I have a feature selected from a feature class based on user input through arcpy. How can I obtain the x,y coordinate of the selected point feature class (Points). How do I do this?: ...
3
votes
2answers
80 views

ArcPy Append Ignores Domains

I've been working with the append tool inside arcpy and discovered that, even though I have domains constraining the values of some of my columns, I never receive an error when the domains are ...
0
votes
1answer
24 views

arcpy pantoselected error

I am trying to get an user input for getting a parcel name and pan the map to that selection. What am I doing wrong in the code below? import arcpy #Msg box to get parcel Name parcel_Name = ...
3
votes
1answer
131 views

Project point to map with Arcpy using GPS Coordinates

I am trying to create a new layer with just a single point using arcpy. All that is provided is a gps lat and long. It seems like it should be a simple problem but I just can't get it to work. I've ...
0
votes
0answers
83 views

Script to turn layers on/off in Data Driven Pages?

I'm working with Data Driven Pages to create a map series of communities (points). I'm using Model Builder to create a line poly feature for each community. The line poly shows the time away from each ...
2
votes
0answers
82 views

Convert Arcpy results to feature class in ArcMap 10.1

I am using ArcGIS 10.1 and am a newbie in Python. Currently we are executing stored procedure (from sql server) through ArcPy in ArcMap. I want to create feature class from executing following python ...
1
vote
2answers
95 views

Open source, Python option for Arcpy's Con tool?

I'm wondering if there is a method to perform a function similar to Arc's Con tool, using open source options in python. I have two rasters, one that shows locations of clouds and the other is just a ...
-1
votes
2answers
41 views

User prompt not working

I created the following "trial.py": import arcpy #Get Name Name = str(arcpy.GetParameterAsText(0)) Then I created a toolbox using ArcCatalog and then added a script, pointed the above script file. ...
1
vote
2answers
104 views

Feature class to Feature class not working

I am trying to use the Featureclass to Featureclass conversion tool to make a copy of an existing layer (in a geodatabase). My primary motive is to copy over only a few (2 out of 18) fields to the new ...
0
votes
1answer
50 views

How to resolve 000210 problem, when I use Scratch Workspace

I have some problem. Now I'm trying to make Python script to resolve some problem. I need too place all out features in Scratch Workspace (Later this script will be used in web GIS and intermediate ...
1
vote
1answer
69 views

how to assign keyboard key to python script in arcmap

I have a python script and I use it through my toolbox but I use it many times in a day. Is it possible to assign a keyboard shortcut to my tool ?
5
votes
2answers
208 views

Creating numpy.array with variable number of fields to test arcpy.da.ExtendTable performance?

There was an ArcPy Café blog posting entitled Adding Fields: Performance Tips which advocated: Two approaches to help increase performance when adding numerous fields to a table or feature ...
-1
votes
1answer
55 views

Determining if polygon contains point to populate point's field with polygon's name using arcpy.da?

Am trying to check if the points in a point shapefile are contained within a polygon shapefile and if so, to populate a field in the point shapefile with the name of the polygon and to populate the ...
1
vote
1answer
265 views

How to Properly Loop Through a List With a Cursor?

My team is working on a python script that does various updating tasks to our streets file. A part we are getting stuck on is trying to update a field. Currently we have a field FEDROUTE that is ...
0
votes
1answer
48 views

TableToTable gives unexpected character after line continuation character? [closed]

I'm working on updating a python script from arcmap 9.3.1 to 10.2.1 and im getting an error for "unexpected character after line continuation character" and im unable to diagnose the character. ...
5
votes
2answers
160 views

What are the alternatives to ArcMap's Report Wizard?

I have a polygon layer which has lots of attributes, and I'd like to create a report template which summarises these attributes for individual polygons. That is, the user will select a polygon from ...
1
vote
2answers
235 views

How to copy data from one table to another using cursors?

I'm going to be as descriptive as possible. I have a table (TA) with values which are null for some rows, filled out for others. I have a table (TB) with the null values filled out. Dec in TA is the ...
1
vote
1answer
68 views

Locating 0-points multipart polygons using arcpy

By Running this piece of code: import arcpy arcpy.env.workspace = "C:\working\GEODATABASES\\tests.gdb" fcList = arcpy.ListFeatureClasses() for fc in fcList: with arcpy.da.SearchCursor(fc, ...
3
votes
1answer
201 views

Customizing right click (context) menu of selected feature using ArcPy?

I want to confirm whether arcpy can customize the right click menu of the selected feature, which means I want to remove the default items and add in my own item. The following pictures show what I ...
1
vote
1answer
100 views

Converting Coverage files into shapefiles?

I am attempting to convert coverage files into shapefiles using arcpy. This is not the e00 files, but the bin files. ArcGIS help suggests that it can be done using ...
0
votes
0answers
56 views

Arcpy raster calculation producing random no data cell in output

I've been trying to get the raster calculation below to work using python: import arcpy from arcpy import env import os from arcpy.sa import * arcpy.CheckOutExtension("spatial") KSat_mm = ...
0
votes
1answer
79 views

DeleteField_management gives ERROR 000308 Invalid field type?

I am attempting to delete a list of fields in a feature layer but am getting an error: Execute error: Failed to execute. Parameters are not valid. ERROR 000308 Invalid Field type Here is a code ...
1
vote
1answer
79 views

Merging multiple tables to shape using for loop

I have to join multiple tables to a shapefile using a common field. I want to script this in python (i am using ArcGIS 10.1). Below is the script i am using. My question is As folks might notice, I ...
1
vote
1answer
46 views

Running a python script that will find fields that are not attributed

I have about 30 geodatabases with about 15 feature classes in each database. Is there a way to have a script check the attribute tables to see if they're not attributed? If it could then select the ...
1
vote
2answers
51 views

Help needed editing existing coordinate information with python

I'm hoping someone can help me with this. I would like to find a way to edit shapefile (polyline) coordinate data using python. Basically, I want to edit all the z-coordinates in my shapefile so that ...
2
votes
3answers
265 views

SQL expression error for Select Layer By Attribute

arcpy.MakeFeatureLayer_management("N05-12_Station2_JGD.shp","station_12") year=2012 arcpy.SelectLayerByAttribute_management("station_12","#",'"closing">=%d AND "opening"<=%d' % year) ...
2
votes
1answer
45 views

Export Stretch Function values - Arcpy

I'm looking for a way to export Stretch Function values from images that’s stored in a Mosaic dataset. Not values from the whole set, but specific stretch functions per image. The set is stored in ...
-1
votes
1answer
105 views

Can someone help me to convert this Python to VBscript for labellling

I have two Python script snippets that need to convert to VBscript. Can anybody help me because I am really not familiar and know Python. the first script is def FindLabel([BA2]): name = ...
0
votes
3answers
177 views

Using ArcPy and Python to export Table View as PDF format?

I am using ArcPy to select from a layer and display the result on map as a table view. Now I want to export the table view as a PDF format. Anybody know about it? If it is beyond ArcPy to export ...
1
vote
2answers
60 views

Issues Reading a table from Geodatabase

I have scripted a process to read a CSV file into a file geodatabase. Then, I want to read this imported file and work on it by adding new fields and calculating values. However, while using the ...
1
vote
2answers
112 views

ArcGIS symmetrical difference in arcgis desktop standard [duplicate]

I have an ArcGis Desktop Standard license and I would like to perform an operation to find out the difference between 2 features classes geometries (Something like symmetrical difference in Arcgis ...
3
votes
1answer
102 views

Python MemoryError when running ArcGIS Python Toolbox tool

I have a Python Toolbox (.pyt) containing a single tool. Part of that tool is the following function, which creates a dictionary from an attribute table, where the keys are the rows' OBJECTIDs and the ...
3
votes
2answers
346 views

How do I know if I am running 64-bit background geoprocessing on ArcMap 10.2?

I'm running ArcMap 10.2 and just set up 'ArcGIS for Desktop Background Geoprocessing (64 bit)' and now I have both the ArcGIS10.2 folder and ArcGISx6410.2 folder inside my python folder. I have ...
8
votes
2answers
260 views

ArcGIS 10: Create an event linear layer from a point layer based on directionality

I have a point layer that reflects the speed limits and a line layer of the roads. The location of the speed sign indicates in which direction the speed limit applies. How can I make linear event ...
0
votes
1answer
37 views

Update rows based on number and position in table

I'm trying to update rows using the update cursor, but based on the number of rows in a sequence of three list items. Looking at the list below, it needs to update first four rows to 'B', then the ...