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

learn more… | top users | synonyms (1)

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
94 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
78 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
121 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
90 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
27 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
124 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
38 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
178 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
177 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
214 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
63 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
29 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
230 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
54 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
659 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
65 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
119 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
233 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
106 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
88 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
43 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
91 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
46 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
98 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
320 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
41 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
48 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_" + ...
0
votes
0answers
34 views

Determine Transect line to cover area

I'm near certain this is a solved problem, but I haven't been able to find a solution from searches so here's my situation (probably I'm searching the wrong thing)... I need to compute the ...
1
vote
1answer
66 views

Cost Distance Paths in Python

I have a feature dataset with 317 points (UpperPoints) and another with 394 (LowerPoints) points. Now I want to calculate the cost paths as in this example here. However there are multiple files used ...
1
vote
1answer
145 views

Waiting for a python script tool to complete while using pythonaddin button

I have created a pythonaddin toolbar, with a button that executes a python script tool. This tool is in an ArcToolbox which has been stored in the Install folder of the addin. It executes and runs ...
0
votes
0answers
22 views

Using file directories from a table

I have a toolset that will be using a set of file directories as input (shapefiles, raster etc.).The table can be stored as CSV or DBF. Is there a way to read a specific cell (row,column) of the ...
0
votes
2answers
113 views

Python ArcGIS 10.0 Expanding select layer by location from point (walking selection)

I have an old ArcView 3 tool which I've been tasked with converting to Python. I'm breaking it down into stages, but there's a "walking selection" I can't trap. To put the query in context, the user ...
1
vote
2answers
84 views

How to create report using arcpy in arcgis 10.2 (result the same as using view -> Reports -> Create Report)

I need to create reports in arcgis 10.2. because I am not intent to request user to go through all the steps for generating reports, so I want to create an add-in tool to do this. The result is the ...
0
votes
1answer
32 views

arcpy to handle topology error inspector

I am now want to do topology check use python, but I don't know whether arcpy can realize the function in error inspector. May I call error inspector and get the error records(something like attribute ...
0
votes
1answer
54 views

Can I validate topology using python script when ArcMap is open?

I am testing on validating topology using python.The situation is when I run the script when arcmap is open, an error occurs which indicates the topology has already been opened (FDO error: ...
2
votes
1answer
158 views

ESRI File Geodatabase with a field calculator with an incrementing number

I've got a python script that runs on the Field Calculator of a ESRI File Database. Right now it runs correctly in that it will increment the last three digits of the value. But this is a script ...
1
vote
1answer
40 views

ArcPy in_memory\ vanishing from ToC

ArcGIS 10.1 - attempting to add a derived raster layer to the ToC. This works in 10.2. In 10.1 I get a screen flash and nothing added. rasterized = r'in_memory\rasterized' ...
0
votes
1answer
110 views

How to compare two rasters and reclass the greater value(python script)?

I am working on an assignment that requires us to reclass a raster(via python) from two rasters. We need to compare the power received at one cell(on raster1) and compare it to the same cell on raster ...
1
vote
1answer
53 views

Updating MXD layer definitionQuery in arcpy is very slow

The code segment below has been extracted from a larger project. In short, I have an MXD which I want to generate multiple PDFs based on different criteria. The code below works. It loops through ...
2
votes
3answers
220 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 ...
3
votes
1answer
116 views

Python script (ArcPy) crashing one machine, but works on others?

I have been woking on a script that will select parcels that are within a particular ArcGIS 10.1 data driven page, create a list out of those parcels, and then populate a text element within my MXD ...
1
vote
1answer
56 views

How to generate StreetFrom and StreetTo data from street segments?

Background: I have a polyline feature class of about 4000 street centerline segments for which I would like to add data on what streets the segments intersect with. I would like to add some new ...
0
votes
1answer
62 views

Determine distance between two lines at multiple locations

We have a number of features that look something like this: I need to measure the distance between the edges of a track (two lines) for all the tracks, and flag locations where the track width ...
2
votes
2answers
65 views

ArcGIS date field to integer

I have a featureclass with a 'date' class field named 'ACQ_DATE' formatted as: 1-8-2013 24-7-2013 etc. As you can see the number of digits is not harmonized. I want to display the dates on a ...
1
vote
1answer
53 views

Updating a Tool Validator Class from a CSV File

I have a CSV file which contains a list of clients and different project numbers and project names. This list is generated periodically. The list can contain multiple values for client name but ...
3
votes
1answer
144 views

ArcPy / ArcMap 10.2: How to report data to user?

I'm developing an arcpy addin with ArcMap 10.2 that outputs a feature layer based on user input. How can I display attributes from this layer in a MessageBox or other reporting mechanism? I don't ...
0
votes
3answers
145 views

Multiple Conditional Statement with in a Con Tool

Well i want to apply multiple conditional statements within a Conditional tool. My aim is to loop through a list of rasters and on the basis of a specified range assign each range with a constant 1, ...
0
votes
2answers
63 views

How to make variables output to user defined workspace

I am running a script in ArcMap and I want to reference the user defined workspace as an output instead of hard coding it in. I have the scratch output set as a user defined parameter. However, I ...
1
vote
2answers
36 views

When creating XY Feature in Arcpy, null values resulting in field being text not numeric

I'm trying to create a feature class from a csv / tab delimited file. All the fields in the file are numeric, but some have null values, and those fields are being coerced into "text" types. ...