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

learn more… | top users | synonyms (1)

1
vote
0answers
44 views

Optimizing arcpy script to batch generate OD cost matrix in road networks

Following the question I asked in this thread, I wrote a python script designed to compute an OD cost matrix given a road network and origins/destinations locations. I am completely new to python, so ...
1
vote
0answers
63 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
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 ...
1
vote
0answers
89 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 ...
1
vote
0answers
130 views

Token Error with ArcGIS Server 10.2.2

I am using the ArPy example from esri sample. Script was working fine but then I updated my ArcGIS Server to 10.2.2 and I am getting this error: Token Expired, Code: 498. I have proper credentials as ...
1
vote
0answers
53 views

Programmatically Load Hyperlink File in ArcMap 10.2

I am using an arcpy script tool to create an XY Event Layer from a text file and then save the layer to a .lyr. This works, but I also want to load a hyperlink file and apply it to the layer ...
1
vote
0answers
89 views

How to replace data source of annotation feature classes using ArcPy?

I want to batch replace paths in a series of .mxd files using Python. Many of the layers have moved and in some cases the name has changed or its dataset is different. I've written this code which ...
1
vote
0answers
36 views

Why does clip only return the top polygon?

I'm running the command below on a data set with many stacked polygons. This is a county standard so I can't change the way they manage their data. Each type of polygon can be uniquely identified ...
1
vote
0answers
57 views

How can a script tool share (dynamic) variables among different modules?

I'm running a python script from the toolbox window (as a script tool). I have a second python (tkinter) module that I use as an input interface. Now, I know that the script tool can call the ...
1
vote
0answers
47 views

How to Build Query Table from two OLE DB tables using ArcPy?

When I run the following code to create a subset of a table, the error says "An invalid SQL statement was used" [Query]. The error shows in line 39. Is there any idea you can figure this out? import ...
1
vote
0answers
56 views

using arcpy to query sde database in python

I have three variables: view_name, column_name, and column_content. column_name contains id, name, address, etc. column_content contains 123, John, 200 King st, etc. user specifies the column_name ...
1
vote
0answers
47 views

Error in cliping raster with multifeature polygon shape with arcgis9.3 using python

I have raster and I have a multifeatured polygonshape file. I Need to Clip my raster Image. Python code was developed for arcgis 9.3. It was working before and suddenly it stoped working. my codes is: ...
1
vote
0answers
98 views

Running python script outside of Arcmap's python console

My codes works fine in Arcmap's python windows. But when I try to run it in a command promt windows, It says that; ERROR 000837: The workspace is not the correct workspace type. But it works fine ...
1
vote
0answers
35 views

What causes “RuntimeError: DataFrameObject: Error in setting extent”?

I'm having a problem whilst trying to set extent on a python script. mapDoc is created using Web_map_as_Json string. Appreciate if anyone can help. result = ...
1
vote
0answers
37 views

Using the geocode function with cursors

How do I use a cursor with a geocodeaddress function? I want to be able to: 1) read from a table 2) only geocode addresses(from table1) whose street number is not 0 using a cursor 3) then update a ...
1
vote
0answers
567 views

How to use replaceDataSource to replace data source for multiple layers?

I appear to be having difficulty with using 'replaceDataSource'. ESRI has atrocious documentation on updating and fixing data sources, and almost everything I have read on the subject is almost what I ...
1
vote
0answers
138 views

How to utilize GPSQLExpression data type in Python Toolbox

I am trying to write my first Python Toolbox for ArcGIS (neat stuff by the way). The tool is simple enough - it connects to SQL Server and downloads data for the user. The trick here is, I want the ...
1
vote
0answers
40 views

Is there a way to test if a feature class is registered with geodatabase?

I've got feature classes inside an Oracle 11g ArcSDE geodatabase. I'd like to perform the arcpy method RegisterWithGeodatabase_management on all those feature classes. But before that, I'd like to ...
1
vote
0answers
44 views

Arcpy PageLayout.dll Errors in Python

import os import arcpy arcpy.env.overwriteOutput=True folderPath= raw_input ("Enter directory: ") filePath= raw_input ("Enter data repository: ") f = open((os.path.join ...
1
vote
0answers
118 views

building a progress dialog with pythonaddins in ArcMap

As a component of my add-in, I compute a bunch of summary statistics when the user clicks a button. This can take a while to process and it can appear as though the program has stopped responding. I ...
1
vote
0answers
100 views

problem in using schema.ini to force ArcMap recognize field types

I have a folder of csv files (500+), and created a very long schema.ini file to force ArcMap recognize field types as I want. However, for some reason, ArcMap can read some CSV files properly; but ...
1
vote
0answers
80 views

Is it possible to get field type information from FieldInfo object in ArcPy?

I'm looking at the FieldInfo object documentation for ArcGIS 10.2 and am not seeing access for field type (e.g. short, string, double). Is it possible to get field type information from the ...
1
vote
0answers
257 views

Why does CON statement give ERROR 010240: Could not save raster dataset to (value) with output format GRID?

I am receiving the following error when trying to run the following code: import arcpy from arcpy import env from arcpy.sa import * arcpy.CheckOutExtension = "Spatial" env.workspace = ...
1
vote
0answers
59 views

How can I output an arbitrary number of file urls from a Synchronous Geoprocessing Service?

Scenario: Custom Export Service. The service creates zip files with shps in them and return the url to the file. I understand if you intend to to run this in synchronous mode, you must have a tool ...
1
vote
0answers
56 views

Weird Error when setting the source path in the “PICTURE_ELEMENT”

I am trying to set the sourceImage to a tiff file using this code: m=1 pic = arcpy.mapping.ListLayoutElements(mxd,"PICTURE_ELEMENT" , str(m))[0] pic.sourceImage = ...
1
vote
0answers
52 views

iisnode with ArcPy

I am calling the child_process in Node to trigger a python script which is importing ArcPy. This works fine until I start sending requests through IIS. Python runs, but importing ArcPy fails. I have ...
1
vote
0answers
166 views

arcpy symbology colors changing on RefreshActiveView()

I have a problem that I'm not sure is functionality not built into arcpy or I'm just doing something wrong. I'm using arcpy.mapping.UpdateLayer() to apply symbology to a layer, but afterwards some ...
1
vote
0answers
120 views

Composite bands produces a single band image

Running this produces a single band tif and not a three band image. Has anyone seen this before or can suggest ways to trouble shoot it? Input_Rasters = path + parentdir + "/" + dir + "/" + ...
1
vote
0answers
54 views

Obtain virtual output directory path in geoprocessing service

I am publishing a geoprocessing service and I want to be able to access the virtual output directory path configured for the service. Now I know that gp services will magically return virtual paths ...
1
vote
0answers
79 views

Why might ArcPy, TableToTable, MakeQueryTable and ArcSDE have performance issue in IDLE?

I have written a Python script tool to do: Make Query Table Table To Table (with fieldmapping). The code is nothing more than arcpy.MakeQueryTable("table1;table2;table3", ...
1
vote
0answers
169 views

merge_management

Here is the edited code: import arcpy import os from arcpy import env set the environment settings env.workspace = "C:\RG\Kings County\Test.gdb" fcs = arcpy.ListFeatureClasses("Sub_NVF_*") ...
1
vote
0answers
85 views

Import related CSVs to geodatabase without losing foreign key relationships

For various reasons I understand it is poor practice to rely upon OBJECTID fields to relate different tables together using a relationship class. Therefore, I have a series of several tables related ...
1
vote
0answers
90 views

Get values from select by location to append to table

I'm trying to calculate the road frontage of polygons by converting polygons to lines and splitting in their vertices, then using select by location to find lines that are within 7.5 meters of the ...
1
vote
0answers
66 views

Convert polygon feature to line feature

I have a polygon shape-file i need to extract the line segments where the polygon features intersect each other and also the segment where they don't. Can we automate this process or can scripting ...
1
vote
0answers
120 views

What is a good way to cluster point data by item counts in ArcGIS?

I have point features that have as an attribute an asset count. For instance, point A may have 3 assets whereas point B may have 300 assets. My goal is to have each point be in two categories: ...
1
vote
0answers
180 views

Change ArcGIS Server mapservice properties programmatically

I am weekly caching my ArcGIS Server mapservice tiles with help of a python script using the arcpy.ManageMapServerCacheTiles_server() command (ArcGIS 10.0, SP5). For whatever reason, this script fails ...
1
vote
0answers
97 views

Use ArcPy to identify annotation reference scale?

I would like to retrieve the value of an annotation feature class reference scale using ArcPy (under ArcGIS 10.1). I cannot find where this property is stored (tried to access using the describe ...
1
vote
0answers
59 views

Insert last coordinates from a list of coordinates with line ID into a multipart polyline feature class

I'm having problems creating the last line from a list of coordinates that I have. I have a text file with coordinate data with a X, Y, and a Line ID (LID). I read the file and inserted each ...
1
vote
0answers
49 views

Creating sign locations from an existing database with offset & dist to nearest intersection (buffer analysis)?

I have a database of 22,000+ signs that contains the offset from centerline along with a distance to/from the edge of pavement to a specific intersecting road for each sign. I also have a street ...
1
vote
0answers
252 views

Arc10.1: intermittent Error using arcpy.Delete() on temporary rasters

I've been pulling my hair out with an intermittent error when running from either the MS-DOS prompt, PyScripter, or WingIDE. Haven't bothered to check w/in Desktop apps (but a colleague says it's the ...
1
vote
0answers
87 views

Subset a GeoTIFF image into regular grids and extract mean latitude, mean longitude, and mean RGB for each grid

How can I subset a GeoTIFF image with 1000 by 1000 pixels into regular square grids of 50 by 50 pixels (400 grid objects in total); and calculate mean latitude, mean longitude, and mean RGB for each ...
1
vote
0answers
252 views

Python Addin toolbar- Environment mask parameter not being recognised?

I've created a button on a python addin toolbar which uses the selected features from the selected layer in the TOC, creates a feature layer from that selection and uses that feature layer to set the ...
1
vote
0answers
161 views

Problems running zonal statistics - not all zones represented

I have been working on a Python script to automate the steps illustrated by whuber here:Create points around the edge of viewshed results I am trying to create a horizon graph illustrating the ...
1
vote
0answers
186 views

arcpy & TraceGeometricNetwork return ERROR 000584

I am developing a script to automate the creation of a road network following varying criteria. I have created a geometric network and I would like to get the connection between several points with ...
1
vote
0answers
156 views

ArcGIS opposite to pivot table

fellow GIS-ers :)! I've been trying to find a tool to do the opposite to what the "pivot table" tool does but I dont thin there is any tools for that. I have a raster data set derived from Landsat ...
1
vote
0answers
60 views

Are polygons created in Arcpy built in any order?

My script uses a search cursor to evaluate polyline coordinates and build polygons based on those coordinates. The script works well, but I am curious as to whether anyone knows the order (if there ...
1
vote
0answers
299 views

How to transfer the attributes of features based on their spatial relationship?

I'd like to check if a point feature class is placed on a line feature using python in ArcGIS 10.0. I have created a set of point features and placed them directly on a group of line features at ...
1
vote
0answers
248 views

Why does a geoprocessing service fail every other time it is run?

I have a ArcGIS Server 10 geoprocessing service right now that takes in a string and runs a parameterized query to SQL Server 2008R2 through pyodbc. The service works, but only every other time. I can ...
1
vote
0answers
198 views

Why does Clip analysis generate (some) empty output?

I am running a script that is working (see below) - it pulls a file from a folder, clips from that file based on an intersection with another file, and creates a new shapefile in a new folder. It has ...
1
vote
0answers
174 views

arcpy ArcGIS Server

Could someone please help me by giving me an example on how to make/connect/Add ArcGIS Server connection via python/arcpy? Thank you in advance. I'm using ArcMap 10.0 I desire to "Use GIS Services" ...