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

learn more… | top users | synonyms (1)

1
vote
0answers
52 views

Speeding up ArcGIS arcpy.Merge_management for MANY files? [closed]

I'm currently running a script that is using the arcpy.Merge_management function to merge roughly ~1500 shapefiles together. When I tried this with much smaller test runs, it ran perfectly. Now ...
2
votes
1answer
82 views

Creating subfolders in ArcPy's 'in_memory'

Is there a way to create a subfolder in memory in ArcPy? For example, instead of temporarily saving a dataset under: r'in_memory/bufferOne' I would like to save it under: ...
0
votes
1answer
52 views

how to update values from python list into feature class

I have a feature class and python list. Feature class has 80 fields and 500 records. List also has 80 sub-list and 500 elements in each. So basically they are same dimension so to say. I want to ...
1
vote
1answer
27 views

Access ArcGIS Server directories in geoprocessing service

I would like to save a file in the output folder on the ArcGIS Server and then provide a link for the user so he can download it. I have two problems: I can't figure out how to access the output ...
0
votes
0answers
30 views

Using the projection of a layer variable to project another in ModelBuilder in ArcGIS (vector version) [closed]

I have several shapefiles in a folder (Folder X) with different coordinate systems (Proj 1 - eg. SAD69_UTM_Zone_21, SAD69_UTM_Zone_24) and another shapefile (shapefile 2) with another specific ...
4
votes
1answer
37 views

How to access the feature extent of a feature class using arcpy?

How can i access to feature extent of a feature class and change the extent using arcpy ?
0
votes
0answers
18 views

Achieving consistent RGB Composite Settings using ArcPy?

Does anyone know if there is an arcpy tool so that when I bring in raster imagery (Specifically Landsat) into ArcMap it will automatically adjust the settings of the RGB composite? I know under ...
3
votes
1answer
62 views

Creating a ValueTable with a column that has dependency

I am creating a python tool which looks like the figure below. Input feature: It asks for a input feature class. Valuetable(Lookup tables): It has two columns - one for look up tables and another ...
1
vote
2answers
32 views

Python Installation and accessing Arcpy Libraries without ArcGIS Setup Installer?

As part of developing scripts and to save the other services/resources accessed by ArcGIS, is there a way or separate installer to install Python and ArcPy libraries alone without installing ArcMap?
0
votes
1answer
31 views

Identify polygons greater than n-th percentile and perform further analyses using arcpy

My goal is to identify tracts that are above the 99 percentile of a variable (xvar), to dissolve contiguous tracts by summing a variable (yvar), and to get the coordinates of the centroids ...
0
votes
2answers
38 views

Turning code into a script and parameterizing?

I have python code that I want to turn into a script. I want the end user to be able to navigate to the feature class the code should be run on. The code I have currently speaks to a specific ...
1
vote
2answers
90 views

Create and Find Shortest Path

In my project, I need to calculate each village's distance along a route to a seaport. However, as you can see in the picture(now deleted for space), not all the villages are ...
3
votes
2answers
89 views

Shapefile Naming conventions in ArcPy?

I have shapefile named `band-tailed_pigeon.shp which is fine and no problem on displaying or geoprocessing on Desktop but in ArcPy when I try to merge some layes to it I am getting this error I ...
0
votes
0answers
17 views

How to dynamically create lyr file in arcpy (for use with group layer)

I'm trying to create an mxd that can dynamically create and name group layers, and populate them with various feature layers. I've seen some examples of how to do this, such as : Creating empty group ...
0
votes
2answers
36 views

ArcGIS add attribute table to PointGeometry using arcpy

I'm trying to add an attribute value to a new PointGeometry before I write it into the new file. How do I do that with arcpy? Let's say in this example I want to write the ID of the line feature into ...
1
vote
1answer
13 views

Issue on Removing Index From Field by Arcpy

Using ArcGIS 10.2 Desktop, I am trying to remove an attribute index from my shapefile (marten.shp) as: import arcpy from arcpy import env env.workspace = "D:\\Map\\Data" ...
2
votes
3answers
66 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
21 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
69 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
28 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
81 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
38 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
51 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
62 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
39 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
57 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
53 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
15 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
21 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
21 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
34 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
51 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
58 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
104 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
42 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 ...
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
41 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
43 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
21 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
51 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
29 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
92 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
29 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
15 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
46 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
46 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 ...