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

learn more… | top users | synonyms (7)

0
votes
0answers
29 views

Create individual feature classes for every record in a single feature class [duplicate]

I have arc desktop 10.3. I have a feature class (nycd) with 59 records in it. I'm trying to create a simple map with an inset that shows where each community district is located in that borough. I'd ...
0
votes
0answers
16 views

What is the default mosaic_method value for MakeMosaicLayer_management?

What is the default mosaic_method for MakeMosaicLayer_management (see help here)? Usually, the docs say This is the default after the default value. And that is usually first option listed. Is the ...
3
votes
1answer
91 views

Creating python script to split selected lines at a set length

I have been having trouble trying to come up with a python script that will go through a polyline feature class representing a river system and split all the streams intersecting with a central river ...
3
votes
1answer
117 views

Why does arcpy.ListFeatureClasses() take so incredibly long?

I'm having an issue where calling arcpy.ListFeatureClasses() in a workspace with 400 shapefiles takes a very long time (more than 10 minutes). Using the os module to achieve the same effect takes ...
0
votes
0answers
36 views

How do you use the setErrorMessage(message:string) within the ToolValidator Class?

The Programming ToolValidor Class ArcGIS Help menu states that: the following method: setErrorMessage(message:string) "Marks the parameter as having an error (a red X) with the supplied message. Tools ...
3
votes
1answer
179 views

Converting large rasters to NumPy

I have a geodatabase that contains a large number of raster datasets - there are two rasters for each country in the world, and they are very large, in some cases up to 3GB per raster dataset. I ...
0
votes
1answer
41 views

arcpy.da.SearchCursor, cannot read preceding zeros from csv

I'm using arcpy.da.SearchCursor to read a csv that has a column with preceding zeros, e.g.: myCSVColumn 0124578 12598 04589 012568 ... When using the arcpy.da.SearchCursor it returns the value w/o ...
3
votes
1answer
31 views

Set up tool to only accept the name of a specific feature class?

I'd like the red x to show in the corner of the tool if they try to load the wrong feature class. That way we can prevent possible errors with the output. I've tried using the error messages arcpy ...
2
votes
2answers
254 views

Copying features from 'in_memory' to 'in_memory' using ArcPy?

I came across this post and found out about Copy_management(). Is it possible to copy an in_memory feature to another in_memory feature? I tried to test it using the following code, which fails: ...
0
votes
1answer
101 views

Debugging RuntimeError: Object: Error in getting parameter as text from arcpy.GetParameterAsText()?

I am trying to get this tool I've been writing for the past month operational. I think it should all work, but I'm getting caught up on the parameters of the code. Here is the start of the code that ...
0
votes
1answer
73 views

Making multiple fields NULL using Python in ArcGIS?

I have a repetitive task here at work. It requires that I make multiple fields NULL as I update the geodatabase. Is there a script I can write that I can input the fields and the feature class. Then ...
1
vote
1answer
223 views

Select from a list of string variables in a custom Python ArcGIS tool?

I've made a few Python tools for ArcGIS lately and haven't had to use this idea in my tools until now. I am making a looong tool that will deal with 13 different districts worth of data. I want the ...
0
votes
0answers
40 views

python (arcpy) command for Construct Polygons

I am looking for a python (arcpy) command for Construct Polygons. I am unable to find it in Esri help. So Is there a python command for Construct Polygon that I may have missed? OR Is there an ...
1
vote
2answers
93 views

How do I generate an image of each polygon in a shape file? [closed]

I have shapefiles containing areas (states, counties, bodies of water, etc.) and need to generate an image (png / jpg) of each area. How can I do this? In my mind, the manual workflow would be: ...
1
vote
0answers
111 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
110 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
95 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
53 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 ...
4
votes
1answer
105 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
35 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
146 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
109 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
37 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
42 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
166 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 ...
4
votes
2answers
153 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 ...
0
votes
0answers
89 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
72 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
34 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
83 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
130 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 ...
2
votes
1answer
128 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
91 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
63 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
170 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
164 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
109 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
170 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
109 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
96 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
82 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
42 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
38 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
35 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
2answers
61 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 ...
3
votes
2answers
128 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
104 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
135 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
175 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
62 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 ...