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

learn more… | top users | synonyms (7)

0
votes
1answer
37 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
34 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
48 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
71 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
27 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
48 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
49 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
38 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
20 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
2answers
79 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
42 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
38 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
96 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 ...
1
vote
2answers
67 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
39 views

Python Process Question

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
27 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
48 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 ...
0
votes
2answers
53 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
40 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
32 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
24 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
30 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
42 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
22 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
57 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
40 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
25 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
24 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
0answers
50 views

Automate nightly updates

Can anybody help with pseudo code or pseudo outline? I am trying to create a nightly update using an xml file. I have not tried anything to tackle this issue other than research. Currently a XML ...
0
votes
1answer
36 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
58 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
57 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" ...
0
votes
2answers
50 views

Assign Mask From Layer in SearchCursor Loop In ArcPy: Error Accessing Environment

I'm trying to run a loop based on a SearchCursor that selects layers from an input polygon and polyline. I want to select a feature from the polygon to use as a mask for running Euclidean Allocation ...
1
vote
0answers
40 views

Rename a empty layer that has been added to a group layer [closed]

Originally I was trying to add a empty layer that was stored on disk. That contained no data. I created the empty layer , by making a group layer within my mxd and then saving it onto a location on my ...
1
vote
2answers
53 views

Count number of group layers or Layers inside group layer using ArcPy? [closed]

I am looking for a way of counting the amount of layers within a group layer I have an empty group layer inside my map and I am looking for a way of initiating a process if there are 0 layers inside ...
2
votes
1answer
45 views

Concatenating Attributes of Points in Same Location using ArcGIS for Desktop?

I have a single feature class that contains multiple points with the same location, but different names and text attributes, and I would like to concatenate the attributes together and merge the ...
1
vote
1answer
33 views

Iterating through list of fields using field calculator?

import arcpy, sys, itertools arcpy.env.workspace = r'path to geodatabase' fields1 = ['gearqty', 'cnemarea', 'fzone', 'qdsq', 'tensmsq', 'crew', 'nanglers', 'port', 'totalquant', 'trip_days', ...
1
vote
1answer
44 views

Find Feature class into another feature data

I am trying to find the feature classes from one feature data into another feature classes. But I'm getting nothing at the end as a result of the matc statement. The data in the arc environment is ...
0
votes
1answer
37 views

PythEveryone in ArcGIS virtual campus module: Runtime error + namerror

I'm working on the python for everyone lab in Esri's Virtual campus. I'm running into an issue that I can't seem to solve, I've already done some outside research hence posting here! The issue: 4th ...
8
votes
1answer
131 views

ArcGIS Pro and ArcGIS Desktop on same machine

I'm just trying out ArcGIS Pro for the first time and I had to change my PYTHONPATH to python34 ArcGIS Pro is now working without crashing every time I open the Analysis tab... However now when I try ...
1
vote
2answers
32 views

Writing value from attribute table to text element using ArcPy?

Is there a way, using ArcPy, to read a field from an attribute table and write the contents of that field into a text element? I have a point feature class with a field name called "Cities". I will ...
1
vote
1answer
42 views

Merge polygons in the same shape file based on attributes, ArcGIS or ArcPy

I have a shapefile of polygons. I do not want any polygons with an area less than 25. For polygons with an area less than 25 I want to merge them with another polygon with an area greater than 25 that ...
8
votes
1answer
132 views

In ArcMap, use python to disable “Scale map elements proportionally to changes in page size”

I am changing sources on MXDs in differents offices using ArcPy and ArcGIS 10.0. As observed here, the printer settings revert to the default printer when the instruction mxd.save() is sent. Losing ...
0
votes
1answer
35 views

Is it possible to run ArcGIS 9.3 python script for ArcGIS 10.3? [duplicate]

I need to translate python 2.5 script for ArcGIS 9.3 to python 2.7 for ArcGIS 10.3. Our office has now all computers with ArcGIS 10.3. So, I need to translate these scripts to arcgis 10.3. Could ...
2
votes
1answer
40 views

Bulk selection by ObjectID using arcpy

Trying to bulk update versioned Feature Classes containing in excess of 30,000 records is causing issue due to the Reconcile/Post process taking too long and ending up with the notice saying that the ...
2
votes
0answers
10 views

How to skip ArcOnline MXDs(ArcPy)

I've previously posted a question about an ArcPy tool that walks through a specified area and scans all MXDs and associated Layers and reports them (as well as the inverse) Search for a shape-file of ...
2
votes
2answers
27 views

Why does psycopg2 “SELECT ST_AsBinary(geom)” return “<read-only buffer…>”?

I'm trying to retrieve polygons out of a postgresql database and I'm running into several problems. First, I've been able to get ST_AsText(geom) to work in conjunction with arcpy.FromWKT(), but the ...
9
votes
2answers
368 views

Create area buffers that are limited by a coastline

I'm trying to use ArcGIS 10.2 to create a buffer of points based on a pre-defined area (e.g 400 sq km). Further to that, the buffers of some of the points are close to the coastline that requires the ...
0
votes
1answer
42 views

Select by Location using first points of polyline

I am trying to select a point from a point layer that intersect a polyline layers firstpoint and using arcpy. I am getting an error "ExecuteError: ERROR 000622: Failed to execute (Select Layer By ...