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

learn more… | top users | synonyms (1)

1
vote
0answers
11 views

Combining duplicate points while preserving their associated attributes

I'm working with building routes for a lit of technician's stops. In some cases, they have two "stops" at the same customer location -- turning on two types of service at a house, for example, is ...
0
votes
1answer
17 views

How to copy layers between MXD's with arcpy?

In ArcGIS I need to being able to have a couple of MXD documents open and copy-paste groups of layers from one MXD's table of contents to another with python script. Is this possible and, if so, how? ...
1
vote
0answers
14 views

Field mapping for append crashes python

I am trying to append multiple feature classes to a new one. As they come from different sources, the fields are all different, so I have to map the fields of the input feature classes to the fields ...
1
vote
1answer
18 views

Multivalue input from a chosen field gives patchy inputs strings

I made a small tool that can be run from a toolbox. It has a validation code to choose multiple values from a specified field from a specified feature layer. It looks quite ordinary: The validation ...
0
votes
2answers
41 views

Same python code works in arcgis python window, but fails in pyScripter

This code works in the arcgis python window but in PyScripter, this warning message had been written: Traceback (most recent call last): File "", line 16, in File "C:\Program Files ...
1
vote
0answers
22 views

Arcpy ListFeatureClasses in same workspace differs when run from ArcMap VS IDLE

This Works The following python script works when connecting to my dev ArcGIS server, from both the ArcMap python window and the IDLE python GUI/shell running on my dev workstation: import arcpy ...
1
vote
0answers
22 views

Copying XY to clipboard using Python Add-In (ArcMap)

I am trying to create a simple tool to copy XY from where i click the mouse button. What i have done already is: create add-in files using Python Add-In Wizard create toolbar and tool inside it in ...
2
votes
0answers
22 views

Trying to preserve attributes using SearchCursor

I am writing a python script for ArcGIS. I'm fairly new to this so I hope I'm not missing something very obvious. I am having trouble preserving the attributes of a polyline feature class when ...
2
votes
0answers
37 views

Most efficient way to intersect overlapping polylines

I have 4 multipart polyline shapefiles (download a sample dataset here). The geometries are identical, except for the length of segments in each shapefile. They represent 4 variables describing an ...
2
votes
1answer
46 views

Exporting results from Select By Location comparisons of each line in one shapefile with polygons in another?

I use ArcMap 10 and I am trying to export multiple selections (a.k.a 'Select by Location') from one file against another. I start by selecting the first line of shapefile A and I want to select all ...
3
votes
0answers
28 views

how to compare geometries (contains, within) in arcpy?

I am trying to use 2 geometry objects to check if a line is within a (rather complex) polygon. The geometry check always fails, even if the line is clearly within the polygon. I use the following ...
2
votes
1answer
26 views

Setting ArcPy environment variables with Python multiprocessing?

I have a script which uses ArcPy + Python multiprocessing. Are ArcPy environment variables shared between separate Python processes? If I write to arcpy.env.extent from within each process am I ...
1
vote
0answers
24 views

Change sde connection parameters with ArcPy

I know you can create a database connection with Arcpy using the CreateDatabaseConnection_management function. I am wondering if anyone knows a way in which to change the parameters of that file. ...
3
votes
3answers
41 views

Calculate field using variables as fields

When I calculate a field like this: field_0="field_name0" arcpy.CalculateField_management("Layer", field_0, '!field_name1! / !field_name2!', "PYTHON_9.3") It works! The field "field_name0" in the ...
0
votes
1answer
40 views

Painfully slow performance with Join and Calculate Field

I have a point layer and a table with approximately 100 fields. I need to join the table to the point layer based on a key field and create a new shapefile / feature class. This script has been ...
1
vote
1answer
38 views

How to add IDs of the links composing a polygon?

I built up a polygon layer from a road network for finding roundabouts using the compactness factor of a polygon. Then I have to intersect the extracted roundabout polygons with the road network so ...
2
votes
1answer
34 views

How to refresh display for newly added labels with ArcObjects

I've added a shapefile to an MXD and Edited the symbolization of it with ArcObjects. Now I'm trying to edit the labeling with ArcObjects. I've successfully been able to edit the default class in the ...
2
votes
0answers
44 views

Correcting addresses with Python or Model Builder

I am trying to make a script in Python (or Model Builder in ArcGIS) for correcting addresses. I have a point shapefile with the addresses (it has X and Y, and fields for "number", "street name", and ...
1
vote
1answer
36 views

Flip multiple vectors

I have thousands of vectors (out of several million) which I need to flip, for directionally purposes (Network Analyst). The vectors in question are annotated that their directionality has been ...
3
votes
1answer
97 views

How to convert polygon singleparts to multipart?

I am interested in converting a polygon featureclass created via Create Fishnet (Data Management) from singleparts to multipart. QGIS has a very handy tool called singleparts to multipart that does ...
0
votes
1answer
34 views

Sorting an UpdateCursor [duplicate]

I'm trying to sort a dataset by field StartTime (datatype date, indicates when a technician is supposed to start a visit). I am including a SQL where_clause to avoid an earlier problem when it ...
2
votes
0answers
33 views

Nested conditional statement in ArcGIS on multiple rasters

I have a list of rasters in ArcGIS and I want to create a conditional (Con) nested statement based on all the rasters of the list. I want this to be reiterate through many lists (the number of rasters ...
0
votes
0answers
19 views

Arcpy and pyqgis on same IDE

I have question: is it possible to set up arcpy and pyqgis on the same IDE (I use Pycharm). I have some problem with running my pyqgis scripts from pycharm. When I first configure Pycharm to recognize ...
1
vote
1answer
21 views

Multiply raster by Numpy derived float value

So I have a python script that uses numpy to calculate the mean of a field, then I try to use that mean value in a raster multiplication as follows: na = ...
2
votes
0answers
42 views

Developing workaround to arcpy.asShape truncating all values to 3 decimal points?

I've read a few questions\answers about converting a GeoJSON Shape into an ESRI Object. Unfortunately most of the answers pointed to decoding the dictionary's manually. Im a bit more lazy ^_^ The ...
0
votes
1answer
23 views

integrating arcpy with other packages [duplicate]

I have the windows installation of python 2.7 that came with arcgis 10.2. In my linux installation of python, I've become fond of other packages, and I'd like to incorporate them into the windows ...
1
vote
1answer
28 views

ArcMap Export PDF vs arcpy Export PDF scale differences

I'm experiencing differences from exporting features to PDF from within ArcMap and using a stand alone python program. Basically, I'm selecting a feature from a layer, zooming to the selected extent, ...
4
votes
2answers
56 views

Maximum number of shapefiles for merge tool?

I have over 180,000 shapefiles that I have to merge (or append) into a final shapefile. I have written a python script to do so which uses the acrpy.append_management tool. However the runtime is too ...
0
votes
1answer
41 views

Arcpy MakeFeatureLayer won't loop

The arcpy snippet below is intended to generate a list of technicians scheduled to work, and then generates a unique feature layer for each one's stops. fcStops = "TaskRoute1016" with ...
2
votes
0answers
15 views

PageLayoutObject error when exporting to a TIFF using arcpy and Python

This is a repeat question that I replaced in Stack Overflow (i apologise as I didnt realise there was a GIS specific section!) - Repeat question I am having an issue when attempting to export to a ...
1
vote
1answer
50 views

Running ArcGIS model at specified time or with delay?

I am looking to start running an ArcGIS model built in ModelBuilder in the future. Start at a specific time. or Start in x hours. or something similar. When I leave the office I may have data ...
2
votes
2answers
52 views

Arcpy Slope Analysis Script

I'm trying to run slope analysis in ArcGIS. I have written an ArcPy script that converted feature layers to raster files. Now I have a list of rasters (each with a unique name) in the table of ...
3
votes
1answer
46 views

Track progress of running GP tools (in arcpy script) programmatically?

I am looking for a way to access a GP tool running in a Python script to be able to see how much of the job has already been done. I have found SetProgressor function, but this one is available only ...
1
vote
1answer
20 views

Batch enabling MapTips

In the layer properties of each layer there is an option "Show MapTips using the display expression" that is by default disabled and I would like to find out if there is a way to enable this option by ...
1
vote
1answer
28 views

arcpy geometry difference method fails randomly, not reproducible

Has anyone used the arcpy geometry difference operator and seen unexplained errors like what I describe below? This is a weird one. I have a script that calculates wave fetch distance in the ocean ...
2
votes
1answer
52 views

Changes not persisting in ArcGIS server from ArcPy script

I have a ArcPy script (10.2) which connects to an ArcGIS server (10.0) versioned geodatabase, via an .sde connection file in the Database connections directory through direct connect on a Microsoft ...
1
vote
1answer
26 views

Run model from python .. module object not callable

Having issues to run a model from python, below the actual code , always return module object not callable. ArcMap 10.1 using arcPy esri python 64 bits Any ideas why ? Thanks import arcpy ...
1
vote
1answer
24 views

How to reclass aspect raster to float values

So I have an aspect raster that was created from a DEM. I'm trying to reclassify it using python, but I'm running into some issues. Here's the setup: I need to reclassify values in the aspect raster ...
0
votes
2answers
56 views

Remove item from legend on a several mxd's

I used this code from this question here: Remove item from legend using ArcPy? However I keep getting an error at the following line: legend = ...
0
votes
2answers
33 views

Converting Feature coordinates to text (same as output from UNGENERATE command in ArcInfo Workstation)?

I am trying to convert stream segments to text. This is function for the script #function to convert feature to text as ungenerate command in ArcGIS workstation def ...
2
votes
1answer
38 views

Updating fields of feature layer and reflecting changes in original data

I am trying to write a script that will select points from a feature class that are within a polygon and update the fields within the original point feature class. The problem I'm running into is ...
4
votes
1answer
49 views

How to delete geoprocessing results in ArcGIS without closing mxd file?

I am trying to run a loop of a couple thousand maps in ArcGIS 10.1 but the program keeps crashing after printing about 100 maps at a time. I read here that I need to make sure my results in Results ...
1
vote
1answer
38 views

Does arcpy have a tool for converting file geodatabase Table to JSON?

arcpy has: arcpy.FeaturesToJSON_conversion() which can handle feature layers, but what about file geodatabase tables? Not too hard to implement custom, but I want something with the same API as ...
3
votes
0answers
54 views

How to use Python's subprocess module in a for loop ArcGIS?

I am new to scripting with ArcGIS. Although this might be an easy thing for those that know Python well, I haven't figured out how to use the subprocess module in a script. I actually think I'm ...
3
votes
2answers
50 views

How do updateParameters and updateMessages Interact in a Python Toolbox?

I have been developing a Python toolbox which consists of 6 parameters. I have received immense amounts of help on this through StackExchange through the following posts: How to Determine if a Layer ...
2
votes
0answers
31 views

Validating whether PDF file Uploaded as part of Geoprocessing Service of ArcGIS for Server?

I'm developing a Python Script that will be a Geoprocessing Service in ArcGIS Server. The Script has a Button for Users to OPTIONALLY Upload a PDF. If the PDF is Uploaded it gets inserted into the ...
2
votes
1answer
27 views

Is there a a way to add a topology dataset to an mxd with arcpy?

I have a script that identifies certain layers from a folder containing several geodatabases. Part of the scripts purposes, or intended purpose is to have it add a topology dataset to the dataframe. ...
2
votes
2answers
58 views

Delete Files in a folder and disregard an existing folder

I did a lot of geoprocessing steps and now I like to delete all files including result, result, _join, _interand reclass in their name. I can do this with the following import glob import os for fl ...
2
votes
2answers
48 views

Using Python to move Text Elements for creating multi-page PDF

I have a map document which contains several text elements that I have grouped and am able to programmatically update. These groups represent a page of data. Now I'd like to export this data as a ...
1
vote
1answer
33 views

Performing multiple “Closest Facilities” analyses for multiple feature classes

I am trying to calculate network distance from 10 points within 896 polygons "SA1s" (a total of 8960 facilities), each to ten points within 186 polygons "DZNs" (a total of 1860 incidents). I would ...