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

learn more… | top users | synonyms (1)

2
votes
2answers
47 views

Finiding Duplicate in buffer distance?

i am desperately looking for solution for one problem. i am having one Point Shape file, i need to check that if there is any duplicate point nearby(lets say 10 meter). i am not familiar with ...
2
votes
4answers
110 views

Select polygons one by one and export them using arcpy

I have a shapefile that contains 200+ metropolitan cities. In each city, there are some tract polygons. The dbf table looks like: tract city xvar 1 0040 20 2 0040 12 3 0040 ...
0
votes
1answer
18 views

Debugging ERROR 000725: Output Dataset: Dataset … already exists?

Using ArcGIS 10.2 Desktop I am trying to run a Merge function by Arcpy as # Set environment settings env.workspace = "E:\\GIS\\ROR" path = "E:\\GIS\\Data\\" featureClass = "band-tailed_pigeon.shp" ...
1
vote
1answer
68 views

How to use da.UpdateCursor with dictionary?

I'm working through some da.UpdateCursor scripts to make updates to a fgdb. Although the script below works successfully, I want to use the dictionary that I have created rather than the manual [ ] ...
2
votes
1answer
26 views

Expanding raster extent with ArcPy?

How can i expand extent of a raster image with Python as the image shown in below. I have the coordinate information of a raster image such as Xmin Ymin Xmax Ymax,how can i expand its extent based on ...
3
votes
1answer
77 views

Using Square brackets in ArcPy update cursor?

I am looking for guidance regrading the usage or meaning of the square brackets in arcpy update cursor (Win 7, ArcGIS 10.2, Python 2.7.5) Although I have serched long and hard with various web ...
0
votes
1answer
34 views

Removing ZM From Geometry Column Polygon Using ArcPy?

Using ArcGIS 10.2 for Desktop, I have some Shapefiles which I have no idea why their Geometry column (shape) contain ZM! now I need to remove all those ZM and get a clean polygon instead. I thought I ...
2
votes
2answers
49 views

Calculating geometry for feature class with x/y and Lat/Long values in different projections?

I have a feature class with x/y values populated on the native projection of the feature class (state plane). In the same feature class I also have Lat/Long fields that I need to populate (WGS 84 in ...
1
vote
1answer
55 views

Change Field Type using Field Mapping for List of Tables using Python

I have a collection of about 200 tables, and I would like to make sure that all the fields are text before merging them into a single table using python. There is at least one field ("Number_of") ...
1
vote
1answer
32 views

How to publish python toolbox with lots of tools in ArcGIS Server 10.3?

I have python toolbox with like 40 tools and I need a quick way to publish the whole toolbox. I found some instructions in the documentation, they state that every tool should be executed and their ...
0
votes
0answers
55 views

Why does gp service change path of scratch data resource?

I'm extremely confused. I have a python script that works fine locally. When I publish it as a geoprocessing service, it publishes fine, but execution of the service fails. The tool creates an ascii ...
2
votes
1answer
51 views

Getting coordinates at location n meters from known point to NW and SE using ArcPy?

I have a point shapefile or feature class and I want to create bounding boxes around each point. The size of the bounding box will depend on user input, for example the user might want a bounding box ...
0
votes
0answers
12 views

Rebuild multiple Address Locators using arcpy run into issues

I have multiple address locators (including a composite locator) stored in a folder which I am trying to rebuild using arcpy 10.1 (ArcGIS 10.1). When I try to rebuild locators looping in an array ...
0
votes
0answers
20 views

How can I “filter” annotations when another layer has a definition query applied?

I have an ArcPy script that runs on a map, looping through a list of asset IDs, to create a definition query for layers and outputting a PDF map for each ID. Thus, each PDF shows only the assets ...
1
vote
1answer
19 views

Finding Point Counts in Multiple Ring Buffers for Multiple Point IDs Using Python

I have a shapefileA that has 13 points. Each of these points is coded with a unique ID from A to M. I created 10 different buffers (representing different distances) around each point via the ...
2
votes
1answer
33 views

ArcGIS temporal relationship between two feature layers

how can I built a temporal relation between two feature layers. My first layer has a observation time period and my second feature has the actual observation. I would like to build the relation ...
2
votes
2answers
44 views

Script (ArcPy) vs field calculator (Python Parser) behaviour of getPart in ArcGIS for Desktop?

From time to time I have to access geometry field and shuffle through points in it. Process is simple: Get shape Get it's part Iterate through part's points This is how it looks like in a script ...
2
votes
1answer
56 views

What is the purpose of arcpy.Array()?

I am wondering what the purpose of arcpy.Array() is. It seems an intermediate step between creating a list of objects and performing some sort of conversion, for example, such as in the sample code ...
4
votes
1answer
74 views

Managing environment variables in arcpy?

The Arcpy documentation seems to suggest that when writing python scripts that utilize/modify variables in arcpy.env, you should wrap everything in a bunch of try/except/(finally) loops with custom ...
1
vote
2answers
102 views

Creating tool in Python toolbox to export field list to Excel?

I am creating my first tool in a Python Toolbox (*.pyt) to export a list of fieldnames to Excel. I have the following bits of code: import arcpy class Toolbox(object): def __init__(self): ...
0
votes
2answers
41 views

How to Dissolve Polygons Inside a Feature Class Based on Attribute Conditions

I have a large shapefile (saleArea.shp) which includes hundreds of small adjacent polygons. I would like to dissolve the polygons based on some conditions from tValues field into 5 bigger groups like ...
-1
votes
0answers
19 views

Basic XSL code for popup [closed]

I'm just starting out with using xsl to configure popups in Arcmap. I have not been able to understand how to select fields and field values using code such as: <xsl:value-of ...
-1
votes
0answers
30 views

How to determine number of points in each grid? [closed]

Lets say I have several scattered elevation points in a project boundary shapefile. I have several 3mx3m grid shapefile for the project boundary. I would like to get a First csv file having a gird ...
0
votes
2answers
52 views

Calculate and Restart Sequential ID for Unique Values in a Field

I need to calculate a sequential ID for unique values in a field. So, for the values in Field1, the sequential ID count should count all occurrences of that value, then restart the count for the next ...
1
vote
2answers
37 views

How to correctly use arcpy.da.Editor

I am attempting to remove duplicates in a feature class that are generated by a Python script. At the end of my script I have the code block below; I haven't implemented it yet, but would like to see ...
1
vote
1answer
37 views

How do I compact a file geodatabase with ArcPy? [duplicate]

I am preparing some data using FME, which I end up writing to an Esri file geodatabase. Unfortunately, FME doesn't appear to update the written feature classes' spatial indices. This results in ...
0
votes
0answers
20 views

Error CreateConstantRaster on ArcGIS Server

I am writing a geoprocessing service with a function to create constant rasters. Currently the process runs fine locally but outputs an error when run on the gp service. The python traceback shows ...
1
vote
1answer
50 views

How to create MXD in folders programmatically,

I have an MXD as a template and about 650 folders. Each folder corresponds to a species. What I want to do is to make an MXD (same as the template) in every folder of each species. How to do ...
0
votes
1answer
33 views

CalculateField_management: Different results than in the field calculator

I`m using ArcMap 10.2.2 and Python 2.7.5 I´m tryig to calculate values with the CalculateField_management tool. my script: def mthree(mthre, mtwo): if mthre >= 1: return -3 if ...
1
vote
1answer
28 views

Automatically create a polygon around other polygons depending on attributes

I have 1000+ polygons, each has an attribute "Project_Area". There are maybe 8 different project areas. Is it possible using built-in Tools or Python to create a new shapefile that encompasses each ...
0
votes
0answers
28 views

Bing Authorization pop up still appears after using script to remove Microsoft Virtual Earth layers [duplicate]

My organisation does not have a Bing key, so Bing and Microsoft Virtual Earth layers don't work and a Bing authorization pop up happens whenever I open a MXD containing them. This pop up interrupts ...
1
vote
3answers
91 views

How to copy entire fields into a python list

I'am trying to find a way to copy entire fields(columns) in a feature class attribute table as lists inside a master list (python). To illustrate it, consider the table below: So the list should ...
0
votes
1answer
24 views

Arcpy script to turn off all layers in a MXD

I tried this standalone script to turn off all layers in the MXD: print "This script turns off the following layers:" try: arcpy except NameError: import arcpy mxd = ...
0
votes
0answers
13 views

Solving OD Cost Matrix gets slower and slower in the iteration process

I have 7000 points, and for each point I want to create a OD cost matrix of that point to all other points and write the result in separate tables - that is 7000 tables with 6999 records each. ...
1
vote
1answer
40 views

How to copy attachment feature class from personal GDB to File GDB?

I have some feature classes with attachments in personal geodatabase . I want to copy these from personal to file geodatabase automatically using arcpy. I used the code suggested by @Aaron to copy ...
1
vote
1answer
42 views

Export coded value domains

I've attempted to write a script that will export all the coded value domains in a geodatabase to a table. Before I dig in the to script and what's wrong, I have looked at the similar question on this ...
1
vote
0answers
30 views

Python code and modelbuilder [closed]

I am working with ArcGIS 10.2 and using python to use the function for zoom to selected feature. I need to have this zoom to selected feature work for any project and I also need drop down menus for ...
0
votes
0answers
16 views

specified target version has no edit versions to reconcile with

I'm writing a script to automate post and reconcile a target and edit version. I consistently get the warning message "The reconcile process was not performed. The specified target version has no edit ...
0
votes
1answer
51 views

arcpy.listfields for a beginner

I am very bad at python and I can't even get this script to work and the worst about this is that its really small script. Lets say I have a shapefile in C:\temp\test.shp and I want to list all the ...
0
votes
1answer
62 views

Creating Python Toolbox (*.pyt)?

I would like to create a new shapefile based on input. My input is DATE parameter. This is my code for input parameter: param = arcpy.Parameter( displayName="TARIKH", name="date_feature", ...
2
votes
0answers
46 views

Accessing results of trace geometric network tool in Python AddIn? [closed]

I'm attempting to write a python addin to ArcGIS that will carry out numerous traces on a geometric network using user specified flags/barriers. The first trace works fine and I'm able to access the ...
0
votes
3answers
56 views

How to export multiple MXD's using python?

I have several mxd's that use data driven pages to create an updated mapbook every month. 15-18 mapbooks and 163 pages each. This usually takes me two days and I'd like to automate this. I can export ...
4
votes
1answer
31 views

Excluding pages without point within extent from Data Driven Pages?

ArcMap 10.2 I am creating a utility mapbook to show HVAC points on an installation. The data driven pages are named and sorted by a separate layer (area feature class). There are 70 named areas, ...
0
votes
1answer
48 views

arcpy.env.overwriteOutput = True not working for one dataset

I am doing a basic copy from sde database to file geodatabase. I have a loop going through each feature dataset in the sde database, this loop is really basic it just uses arcpy.Copy_Management to ...
2
votes
1answer
27 views

ERROR 000271: Cannot open the input datasets Failed to execute (CompositeBands) (arcpy)

I am trying to stack bands 3 and 4 together for numerous landsat scenes, and I am trying to do it using a loop and arcpy.CompositeBands_management. The code I am using is: import arcpy #set ...
0
votes
2answers
36 views

Finding empty attribute field with search cursor

I'm trying to iterate through all fields in my feature classes to find which fields are empty. I've had a go at using the SearchCursor (borrowing bits of code from other answers). This is what I ...
0
votes
0answers
22 views

updateParameter() python toolbox

I can't update parameters in my Python Toolbox and I don't understand why. Someone can help me with this example code? class Tool(object): def __init__(self): self.label = "Tool" ...
1
vote
1answer
48 views

How to delete duplicate rows where multiple values are duplicated?

I have a feature class where there are multiple values duplicated in a row, i.e. SRNumber and RESOLUTION_CODE. I would like to delete all rows where my SRNumber and RESOLUTION_CODE are found in ...
0
votes
0answers
7 views

Putting “halo style” to labels with ArcPy? [duplicate]

I'm using ArcGIS 10.3 and I'm making a script I need to turn the field label of "ROUTE" and put my halo style lebels and add a text to my lebels this is my script as could modify my script? layer = ...
0
votes
1answer
48 views

How to batch merge point, polygon and line feature classes into a new feature class?

Using ArcGIS 10.3 for desktop. For our noxious weed surveys, we have some features recorded as polygons, some as lines, and some as points. I would like to convert everything to points, and then ...