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

learn more… | top users | synonyms (1)

0
votes
1answer
42 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
132 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
80 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
54 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
115 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
79 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
40 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
62 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
48 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
38 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
48 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
177 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
37 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
47 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
112 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
51 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
62 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
64 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
148 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
242 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
32 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 ...
1
vote
2answers
96 views

Using ArcPy: adding feature class and fields in an un-saved mxd

With ArcPy I have created a tool that creates an empty feature class with pre-defined fields and adds it to the TOC. It works quite well, however if I use the tool to generate a feature class in an ...
1
vote
0answers
37 views

Get XY in different projection without changing data frame using python addin [duplicate]

I been searching for a way to use this http://forums.arcgis.com/threads/49273-getting-xy-from-mouse-click-using-python tool but print the XY in different coordinate system like WGS 1984 (decimal ...
0
votes
1answer
77 views

Iterative raster calculation script using NumPy arrays breaks after ~10 rasters, returns: “TypeError: Cannot create raster for numpy array.”

Here is my code: #Generate Cumulative Thresholds #5/15/14 import os import glob import arcpy import numpy as np #Enable overwriting output data arcpy.env.overwriteOutput = True ...
1
vote
1answer
66 views

Raster calculation in for loop returning exit code -1

I've put together a python script that does some calculations on rasters by converting them to NumPy arrays, doing the math, then converting them back to Raster and applying all the same spatial ...
0
votes
1answer
103 views

ArcGIS 10.2.1 Table To Table tool in Python script gives ExecuteError: ERROR 001156?

I work for an organization that just upgraded from esri arcmap 9.3.1 to 10.2.1 and I'm currently in the process of updating the python scripts. When running a script I'm getting hung up on a portion ...
2
votes
1answer
76 views

Unexpected Polygon Zoom Extents with a Rotated Dataframe

I have created a series of roated Grid Index Features. I wrote an ArcPy script to generate the grids and adds a rotation value field. My plan is to run another ArcPy script that zooms to each grid ...
0
votes
0answers
26 views

Using GDAL and Python to replace the Spatial Analyst TabulateArea method

Has anyone tried to phase out the use of ESRI's Spatial Analyst extension by replacing it with GDAL in Python? I have a script that only uses the TabulateArea and Statistics analysis but not much else ...
2
votes
2answers
115 views

Nested loops for raster calculation arcpy

I am trying to figure out a way to input corresponding raster datasets from two separate folders into an equation using arcpy. I think it requires some sort of nested loop but I can't figure out how ...
1
vote
0answers
34 views

Why is ArcGIS Server so slow in creating mapbook PNG

We have 3 MXDs for creating 3 different mapbooks. Our customer want a daily export to PNG. For this, I use a Python-Script, which works fine for me on my Desktop. But I need it on ArcGIS Server. There ...
7
votes
3answers
173 views

How to perform a “mostly within” selection?

I'm looking for a way to determine if a polyline is "mostly within" a polygon. Since mostly within is arbitrary, I would need be able to enter a percentage at its execution. I thought there might ...
4
votes
2answers
166 views

Is it a bad idea to convert a File Geodatabase table to a dictionary?

First, what am I trying to do? I am building a Python script that should be called from an ArcMap 10.0 toolbox. This scripts uses (among other inputs) data contained in huge gdb tables. It processes ...
2
votes
0answers
165 views

Running x64 bit geoprocessing Python in Python IDLE 2.7.6 x64 error

I am trying to set the Python IDLE 2.7.6 x64 to run the arcpy module from ArcGIS x64 bit geoprocessing (10.2.2). I copied the file DTBGGP64.pth from C:\Python27\ArcGISx6410.2\Lib\site-packages to ...
1
vote
1answer
54 views

row.getValue() doesn't work but row[1] does

for some reason I can't get row.getValue to work properly... my script will only work if I use row[0] and get the value manually but I am sure the location/order of my fields will change from dataset ...
0
votes
1answer
28 views

How to group numbers based on first digits and then find min/max? [closed]

I have been struggling all day with this. I wish Python were more like SQL it would be so easy for me, but I am still learning. Basically, I just want to group numbers based on their first four ...
0
votes
3answers
200 views

Can't Clear Combobox - Arcpy Addin

I'm using ArcGIS 10.2.1 and have written an Arcpy addin with multiple comboboxes and an "Unselect" button. The comboboxes run queries on the data and the button clears the selections. I need the ...
3
votes
0answers
50 views

Arcpy in Python Plugin for SPSS

Is it possible to run the arcpy module in the Python for SPSS plugin to run the search and update cursors?
2
votes
1answer
399 views

Getting ValueError: max() arg is an empty sequence on a Python Script in the Field Calculator in ArcMap

I have a script that populates a FacilityID Field on a Attribute table in the Field Calculator but when I run the script below I am getting a error. EDIT: Python Script: def autoInc(): import ...
1
vote
2answers
56 views

Clip for each feature

I want to clip a polyline feature class by a polygon feature class (buffers created from points). Several polygons overlap, so I want to get each polygon feature clipped with each polyline feature. ...
1
vote
0answers
90 views

Using arcpy.CopyFeatures_management results in a 000210 using a database connection that does not contain saved credentials

Currently have a problem running CopyFeatures_management in ESRI's ArcGIS 10.1 The following shows two Enterprise Geodatabase connection files. One includes the username and password and the other ...
2
votes
0answers
219 views

Split a Polygon that Crosses International Date Line, ArcPy [closed]

I have a lots of existing data in WGS-1984 (too much to manually edit). I need to split these lines and polygons by the international date line. More projection information: ...
0
votes
1answer
99 views

Batch renaming of shapefiles using ArcPy and folder name where shapefile is stored?

I am very new to Python and wondered if anyone had any idea how to do this? I have ~100+ shapefiles named 'land boundary' within the folder of their site name. Is this possible using Python in ...
4
votes
2answers
78 views

ArcGIS Toolbox, parameters for python script not as positional arguments

I have an ArcGIS Toolbox with a bunch of parameters. A python script is used to perform some raster operations, based on this parameters. I am using Python argparse in the script to get the ...
0
votes
0answers
34 views

when using arcpy.mapping.ListDataFrames, python.exe crash

Has anybody had this problem? this drive me crazy. what is wrong with my code? import arcpy mxd = arcpy.mapping.MapDocument(r"D:\Project\Project.mxd") df = arcpy.mapping.ListDataFrames(mxd, ...
4
votes
1answer
77 views

Most efficient method to join multiple fields in ArcGIS

I have as set of shapefiles with approximately 300000 polygons each, as well as corresponding point shapefiles and tables with approximately the same number of row (equal or less rows than the ...
2
votes
2answers
44 views

How to obtain the value of a feature programatically, based on a coordinate

I have a point layer, and a polygon layer, and I wish to calculate the value of an attribute from the polygon layer at each point's location. Eg, find the area of the polygon which is found at each ...
0
votes
1answer
76 views

How to select a feature and get its fields by mouse click using Python Addin in ArcGIS?

I'm building a python addin tool in arcgis and I would like to click a feature, say a polygon on the map, and get the polygon's attributes,i.e. ID=3,NAME = "CITY3"...It's similar as the arcmap tool ...
1
vote
1answer
216 views

How to create a polygon feature class from polylines in Python Arcgis?

I am trying to create a polygon from polylines. I've created this script but it gives errors of Arrays. Thanks. import arcpy polyline=r'C:\temp\temp_lines.shp' ...
0
votes
2answers
35 views

A tool as part of a dialog box

I have a button created using Python Add-Ins which pops up a dialog box which is built using wxpython. I am wondering if I can place a tool (Select Layer by Location) within that dialog box to get ...
0
votes
2answers
44 views

CalculateField_management no-success

The following script is suppose to do the following, similar to what was done here: Renaming a field using arcpy. Create a fieldlist. Read thru the fieldlist and create a new field named "OLD_" + ...