A site-package created by Esri to expose GeoProcessing from ArcGIS to Python.

learn more… | top users | synonyms (7)

1
vote
1answer
31 views

How arcMap tool run in async mode with arcpy?

I am using python in arcmap 10.0 to execute "Topo To Raster" tool. I am successful to execute this in blocking/sync mode. but I want to execute this tool with python in async mode. workspacePath = ...
2
votes
1answer
90 views

Grouping polygons by spatial attributes

I'm working with a dataset that contains millions of polygons representing leased properties. In many cases, there are multiple polygons that are drawn on top of one another (representing multiple ...
1
vote
2answers
59 views

Switching out layers but keeping the order the same (see figure) with ArcMap and Arcpy

I need to update the table of contents for a given .mxd by keeping a certain order but switching out the contents. I can bring in the new feature classes as map layers, and delete the old map layers ...
3
votes
2answers
71 views

Using Arcpy to Turn on Maplex Label Engine

I've been attempting to automate a number of processes into one script using arcpy. I've got everything working and am wondering if there's a way to use arcpy to toggle on/off the Maplex Label Engine. ...
2
votes
1answer
72 views

How to SelectLayerByAttribute Xcoordinate and Ycoordinate

I am having trouble selecting by attribute when I am trying to select by the Xcoordinate and Ycoordinate. For example ...
1
vote
3answers
96 views

Creating series of lines offset from starting points (ArcGIS, arcpy)

I've got a series of points representing generalized locations of trawling activity over many years. A single XY location can represent many trawling records. I'm attempting to create a series of ...
1
vote
1answer
43 views

Calculate Field throws an error when parsing python with backslashes

I have an FTP I need to access through a python script. It works fine with forward slashes, but I don't need it to be read as an html. Below are both sets of code: Working: ...
1
vote
1answer
56 views

Joining a csv table to the attribute table of a feature class in arc gis 10.3

I am new to arcpy. I was trying to join a csv table to the attribute table of a feature class. Here I would like to share what i was trying to do. import arcpy, csv from arcpy import env ...
4
votes
1answer
80 views

Using UNC pathname with Calculate Field tool in ArcPy?

This question is different to Using Calculate Field to fix hyperlinks in ArcPy gives Cannot use VB for services? which was asked previously because it is using the Python parser specifically, rather ...
3
votes
1answer
64 views

Using Feature Dataset with ReplaceDataSource gives ValueError: Layer: Unexpected error?

I'm attempting to replace the data source of a unsourced layer with a mxd. The issue I'm having is that the Featureclass "APPL" is contained within a Feature Dataset. When the feature class is outside ...
1
vote
2answers
63 views

Run model in MXD using Python

I'm very new to python so please bear with me. I am trying to run a model that exports a .wm feature to a geodatabase feature class. The .wm file extension is for software that is used to update ...
0
votes
1answer
62 views

Arcpy: creating a line on an existing line based on points' coordinates

I have a point which is some meters away from an existing line: This point should be snapped to the line (to the closest part) and then, based on the points' new coordinates, a new line Feature ...
0
votes
1answer
70 views

Reading shapefile directory in Python? [closed]

I am developing tool on ArcGIS ArcMap 10.0 with .NET and Python technology. In TOPOTORASTER tool , I give a line feature class. the line feature class path something like this: inputOne = ...
6
votes
1answer
127 views

Geoprocessing in violated convention environments (Microsoft Windows)

Our MapInfo and ArcGIS users have self managed file shares. I do my best to educate our users about windows naming conventions but years of violating basic conventions and personalities that don't ...
1
vote
2answers
61 views

Using Calculate Field to fix hyperlinks in ArcPy gives Cannot use VB for services?

Getting an error while trying to script it, specifically "Cannot use VB for services." Snippet and VB code block as follows: Raw block (works within ArcMap): "\ftp\raw\YYYYMMDD\Files\Charles" ...
3
votes
1answer
116 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 ...
3
votes
1answer
82 views

ArcPy getPartCount always returns 1 on multipart polygons?

in this post Why does the method partCount in ArcGIS always give back a value of 1? a problem occured that could easily be reproduced. partCount is always 1! Is it a wrong usage of partCount or did ...
2
votes
1answer
49 views

Add shp attribute data to column with python script

If feature column (feature is the name of the column) in table is ferry crossing in the attribute data then I need to add Yes to the Ferry column that I have already added to the table. If the ...
0
votes
1answer
62 views

Arcpy get point feature at start and endpoint of Line feature

I am having trouble getting a feature that is at the start and end point of a line. I can get the start and end point of the line but I am not sure how to grab the Point feature that is at the start ...
2
votes
1answer
47 views

ArcPy - Syntax Error when using reclassify tool

I have been writing a code to automate a variety of processes in Arc Toolbox. I have used a line to reclassify before but this time when using it I am coming up with a Parsing Error (SyntaxError). I ...
3
votes
1answer
73 views

arcpy.da.SearchCursor(fc,[“SHAPE@”]) has no firstPoint object

I am having trouble getting the start and end point of a line using the code below. import arcpy with arcpy.da.SearchCursor("Lines",["Material","SHAPE@"]) as curs: for row in curs: ...
3
votes
3answers
124 views

python script tool validation checkboxes to radio boxes?

I am trying to build a tool in arcmap, which uses radio buttons in its gui. Since I read, that radio buttons are not supported, I figured, it couldn't be too hard changing the behaviour of simple ...
1
vote
1answer
35 views

Script for running Feature Class To Coverage tool runs into error on arcgis server

I have created a script for converting feature classes to coverage and it runs fine in arcmap. But after publishing and running it on the server, it fails to execute and returns the following error ...
2
votes
2answers
79 views

IOError: “[u'Hospitals',u'Parcels',u'Roads']” does not exist

I was wondering if someone could help me figure out what's going wrong with my code. It's at the very end of a code that, once a link to a geodatabase is inserted, will print the name, directory, ...
1
vote
2answers
61 views

Using Python to select records by date field

I am trying to write a python script to select records created within the past 7 hours (date field - database time) using a where-clause within arcpy. The table is ArcSDE database (Microsoft SQL ...
3
votes
1answer
53 views

Getting different pixel depths from output raster when done in ArcMap versus Arcpy?

When I use 'Plus' in Spatial Analyst to add together two 8-bit unsigned rasters (pixel values 0-100) the output raster is 8-bit unsigned (pixel values 0-200) but when I try and do the same thing ...
0
votes
0answers
73 views

arcpy.UploadServiceDefinition_server sometime fails with Error:999999 and fixed with swapping identical ags connection files

I need help resolving an intermittent 999999 failure during arcpy.UploadServiceDefinition_server. I'm using arcpy.UploadServiceDefinition_server with a saved ags arcserver connection file as part of ...
2
votes
3answers
230 views

FeatureClassToFeatureClass_conversion: How to export feature class to shapefile without losing OBJECTID

I am trying to automate a workflow which involves exporting multiple feature classes (within a geodatabase) to shapefile format. My inclination has been to use the ...
0
votes
0answers
48 views

Adding a Field to a Feature Class using Python

I'm trying to create a script that adds an integer field to a File GDB, calculates it, buffers it, then clips it to a different GDB featureclass. Can anyone help me, I'm stuck so far!? I'll provide my ...
0
votes
1answer
106 views

Export all data driven pages to PDF using Python script

I am a novice Python user but I am trying to create a script which will allow me to export all of the data driven pages within an mxd to a single pdf file (without having to open the mxd) I currently ...
2
votes
0answers
102 views

Merge n number of adjacent polygons [closed]

I have over 17,000 individual polygons. I want to merge two adjacent polygons so that I finish with approximately 8,500 polygons. The polygons need to be merged based on location, merge two adjacent ...
2
votes
2answers
82 views

Column does not exist - python

My goal is to count the number of wells in each county. I've verified the columns are correct as listed in the attribute table. Do I have a typing or formatting error? I wanted to pull county names ...
1
vote
1answer
50 views

Using Select Layer By Location in ArcPy?

I'm a new Python student looking for some help regarding a homework problem. I need to analyze wells with each county in a state. So I have the wells shapefile and a counties shapefile for a state. ...
0
votes
0answers
36 views

Using Near Feature Tool with Conditions

I am using near feature tool in ArcGIS 10.1. However, I need to add another condition to it (not only the nearest). The feature (point) that i am looking for, is the nearest (point) and also doesnot ...
0
votes
0answers
53 views

Inexplicable behavior after function call using 'arcpy.mapping.ListLayers'

I have seen some discussions regarding (eventual) bugs when using acrpy.mapping.ListLayers (and perhaps(?) other 'mapping' methods) where the (current) mxd is passed. I have a feeling the following is ...
1
vote
2answers
67 views

Using ArcPy, I can't panToExtent to intended area using Decimal Degree coordinate

I'm trying to programmatically pan to a coordinate before I export a map and I've started off by using Identify to get a test coordinate in Decimal Degrees: mxd = arcpy.mapping.MapDocument("CURRENT") ...
2
votes
0answers
47 views

How do I speed up testing debugging when I am loading a large module as part of my program? [closed]

I'm using PyScripter to do some python geocoding automation and I'm coming across the situation where I am waiting several tens of seconds for a large module to be imported. This is very inconvenient ...
1
vote
2answers
37 views

Labeling Poles in Sequential Order on Data Driven Pages Along a Curvy Route

Is there a way to automate the process of labeling poles #'s on data driven pages along a curvy route in sequential order? The many bends and turns of the route is throwing off the ordering. the ...
0
votes
1answer
27 views

Selecting groups of files and iterating composite raster

I have a query regarding the best way to process the multispectral data I requested to be collected for my MSc study site. The data I am working with has been saved as single band tiffs, rather than ...
1
vote
1answer
46 views

Aligning point along the line in ArcGIS

I have a line and some points along with line, but they are not equally distanced from line. I want to align them at equal distance along the line, let's say, every point should be at a distance of 10 ...
1
vote
2answers
50 views

Recording the ArcPy script execution method

I have composed an ArcPy script which is run via a windows scheduler.The same script is loaded into a script tool so a user can run the process manually. I've used: get parameters as text, with or's ...
1
vote
0answers
46 views

Create symbology for new layer using Python (arcpy.mapping)

I have some ArcMap addin that creates new layer and add it into table of content. I need to set up a symbology for the newly created layer based on the attribute table (three differnet values > three ...
0
votes
1answer
85 views

Improving processing time of ArcPy script?

Background: I work for an electrical utility, and we have a point feature class called "meters" that contains approximately 35,000 records. These records represent the actual power meter, and contain ...
0
votes
1answer
52 views

replace ü/ ö/ ä / spaces and brackets in Attribute Table [duplicate]

I've got a Polygon Feature Class of communities in switzerland. Unfortunately, the names in the attribute Field "NAME" include spaces, brackets and ä/ ö/ ü characters. For further processing, i need ...
0
votes
0answers
34 views

How to add local locator map/index in ArcGIS 10x?

I want to add local locator map in ArcGIS,like: As it shown in zoom level, otherwise by datadriven pages defines the locator map in original is like:. What kind of python script i can used for this to ...
2
votes
1answer
52 views

Set label font size for layer via Python

I have some ArcMap addin that creates new layer and add it into table of content. I need to set up labels for that layer. I have made some script for labeling layer: mxd = ...
0
votes
1answer
51 views

Arcpy Error 000732 Failed to Execute (TabletoTable)

I know this is a duplication, but I have read all the other answers on the forum and haven't gotten any solution. This is my code: #Import environment settings import os, sys, string import arcpy ...
2
votes
2answers
93 views

AttributeError: 'Layer' object has no attribute 'listLayers'

I want to use the result of OD cost matrix for my further calculations. However, whne I try to extract the sublayer "lines" it returnes an error AttributeError: 'Layer' object has no attribute ...
0
votes
0answers
74 views

arcpy UpdateCursor throws exception on geoprocessing service?

I wrote Python code that changes the state of a feature by ID. I am not using a Python Toolbox (.pyt). I wrote a python script and added it into a standard toolbox (.tbx). Using ArcGIS Desktop ...
0
votes
0answers
28 views

How can I get arcpy.TraceGeometricNetwork_management results? [duplicate]

I have geometric network and try to launch Python script with tracing gdb = "C:/Users/my_user/Documents/ArcGIS/gn/gn.gdb" gdb += "/gn/" geometric_net = gdb + "gn_Net" flags = gdb + "flags" ...