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

learn more… | top users | synonyms (1)

0
votes
2answers
39 views

arcpy calculate string field: Any ideas what how to fix this?

I'm trying to store a string value obtained from a loop through a tuple into a field called ROW_1. The code goes like this: for creekclass in listOfClassTuples: (classname, Permanency, ...
2
votes
1answer
38 views

How can you alter label styles (font, color, size, etc.) using Python scripting? (ArcGIS 10.2)

I am trying to write a python macro that will automate the process of labeling points in a layer based on different types of apartments. For example, one style of apartments would have a blue square ...
0
votes
0answers
21 views

mxd.saveACopy(outMxd) not working

Getting an intermittent error. I'm opening an MXD, modifying, and then trying to save out with a new name. I think it's because the output MXD name is similar to the input MXD name. Note that I ...
2
votes
2answers
32 views

Python Tool Not Opening

I know that this is definitely an ambiguous question. However, I initially had my Python toolbox working great. I then wanted to have additional functionality with it and added some more coding. ...
0
votes
0answers
30 views

Facing difficulty in saving an output to CSV

After implementing the code published by Jason in this answer to How to list feature classes in multiple geodatabases in a folder?, I have received an output like this: ...
0
votes
1answer
38 views

Avoiding ImportError: No module named numpy?

When I try to import ArcPy, I get the following message. Any help would be appreciated.
3
votes
4answers
271 views

Having trouble with 'and' 'or' statements and negative numbers

I have set up a program that calculates the relationship between a point and the first point of a polyline. The aim of the program is to run this calculation and then copy the result to a certain ...
0
votes
1answer
115 views

Python in ArcGis, cannot find what is wrong with my syntax

I am using Feature class to Feature class to batch convert some .dwg files. However python does not like the last statement (name). It's probably something very simple, any idea where I'm going ...
2
votes
2answers
27 views

Preventing ArcPy from changing MXD extent?

I want to process mxd datasources without changing the extent. When I open the MXD in ArcMap and click full extent, I get 1:214,890, after I save and re-open in ArcMap I get what I saved with. ...
1
vote
0answers
11 views

Kriging Interpolation of Daily rainfall data using ArcPy?

I want to perform the interpolation of daily rainfall data for 7 years. I am now working on python using arcpy module. I face several problems while performing interpolation Some day there is no ...
1
vote
0answers
11 views

Error 000725 importing Python (Arcpy) script into tool of standard toolbox? [duplicate]

I have created a Python script. When I run the script as a standalone by make this a hard set path instead of sys.argv1, the script really runs fine. When I import this script as a python tool box ...
5
votes
1answer
33 views

PySAL natural breaks from Numpy array

I am attempting to extract natural break values from a raster using Python. The intended process goes: Arcpy raster object to NumPy Array (using RasterToNumPyArray) to natural break values (using ...
1
vote
1answer
11 views

Including NoData zones in zonal statistics table

I am running the zonal statistic tool on a raster with a shapefile that consists of several regional polygons. I would like the zonal statistic to include the regions that are completely NoData in the ...
1
vote
1answer
16 views

Changing order of parts in multipart geometry using ArcGIS for Desktop (or ArcPy)?

Is it possible in ArcGIS to change order of the parts in multipart geometry? In the context menu i founded "insert before" , "insert after" but it never comes active ... or is it possible via ...
1
vote
0answers
22 views

User input and passing variables with ModelBuilder

I have created three modelbuilder tools that must be run in sequence. After running each tool, the user must examine several shapefiles and potentially change the input parameters of the next tool. ...
1
vote
2answers
37 views

Select points within a polygon and update attributes

This seems really simple but I can't get it to work. I have two feature classes, a polygon of sales areas for a city, and point layer of addresses. I want to select the addresses based on the sales ...
-3
votes
0answers
30 views

Exporting group layers from Table of Contents (TOC) to Folders of shapefiles?

I have some group layers in the Table of Contents (TOC). Each group of layers references a few shapefiles from different source folders. I would like to export each group layer name as a folder and ...
-2
votes
1answer
50 views

Exporting file geodatabase (GDB) to Folder of shapefiles?

I have a geodatabase with several feature dataset and feature classes associated with it. I want to export each feature dataset as folder and feature classes associated with each feature dataset will ...
1
vote
1answer
42 views

Importing file geodatabase (GDB) to table of contents (TOC) of ArcMap?

I have a geodatabase with several feature dataset and feature classes associated with it respectively. I would like to create a .mxd where the Table of contents consist of group layer and each group ...
1
vote
0answers
36 views

ArcPy on 64 bit Windows [duplicate]

I can't import arcpy into 64 bit Python. It works just fine in the python install from arcGIS, though. When I try to import it elsewhere, I get this error: Traceback (most recent call last): File ...
0
votes
0answers
20 views

PythonWin Debugging

My question is theoretical. I want to debug my script in Pythonwin. Everything is OK when I run my script normally (without debugging) but if I am debugging it, my script fails when it tries to read a ...
1
vote
1answer
37 views

Export Multiple Raster Data with custom Cell Size

I Have 172 Raster, and need to change the cellsize. So I use Export Data from TOC and change the cellsize manually (example I want to change it to "3") I tried using this python script to ...
1
vote
3answers
69 views

polygons to polygon conversion with attribute name [duplicate]

1) I have a polygon shapefile with 1000 multi-part polygons in it. Each Row of the table is a multipart polygon. 2) I need 1000 shapefiles with 1 multi-part polygon in each. 3) Each output shapefile ...
2
votes
1answer
55 views

ListRasters based on filename using Arcpy

I am trying to create a python script for ArcMap which calculates the ndvi from two raster images for each RGB/NIR pair in a folder. However, I am unsure how to create two raster lists; one which ...
3
votes
1answer
20 views

Accept multiple input types in ArcGIS Script Tools UI

everyone! I'm working on a python script that calculates aggregations of ACS Variables (i.e. adding "Renters who spend more than 30% of Annual Income on Rent", "...40%...", "...50%...", etc.). The ...
1
vote
1answer
34 views

How to generate a choice list (dropdown) in a toolbox that will allow the user to select a field in a csv as input?

I need to input a csv as parameter 1. Parameter 2 should be a dropdown displaying the various fields (the headerline) where I can select a column to use for geoprocessing. Param1: c:\my.csv ...
1
vote
1answer
36 views

How to ascertain if a cell/field contains a value in ArcGIS attribute table

I have done a bit of research on this but can't seem to find an answer. I am wondering if there is a way to identify whether a cell/field in the ArcGIS attribute table contains a value using the ...
0
votes
0answers
59 views

Looping through each specified layer and exporting PDF map showing shapefile and information taken from each attribute table?

I have been working on an automation script for the purpose of mass pdf exportmaps. I am required to export many pdf maps showing individual boundary files and client information. I believe the ...
2
votes
1answer
49 views

How to check shape length before running code in Python/ArcPy?

I am using a code to convert a polygon into evenly spaced parallel lines for point in range(0,numPoints+1): shortPoint1 = currentLines[firstLong].positionAlongLine(lineSpaceNum*point) ...
2
votes
1answer
30 views

How to create Multipart Line in ArcPy?

I am developing some script in where I want to create custom multi part line geometry. For example: I have one array of points a,b,c and second array of points e,d,f. I want to create one ...
0
votes
2answers
34 views

problem with csv.writer output Python 2.7 [closed]

I cobbled together a script from hacked bits around the net that works pretty darned well except..... The screen return is perfect but the csv contents (filename and path) have deliminators in them. ...
0
votes
0answers
41 views

Exporting table of contents (TOC) with group layers to file geodatabase (GDB) with feature datasets?

I have created a python code for exporting shapefiles from TOC from different source folder to a output folder. However, in this case, I have some group layers in the Table of Contents (TOC). ...
1
vote
1answer
44 views

Listing all feature datasets and classes from multiple geodatabase into CSV file? [duplicate]

I have a folder having multiple geodatabase and I am calling that folder “Multiplegdb” There are 3 geodatabase in a folder which are as follows: ABC.gdb UVW.gdb XYZ.gdb Each geodatabase have ...
1
vote
1answer
18 views

Batch processing of geodatabases - join raster with table

I am unsure how to go about doing this using Python in ArcMap, though I know how to do it by hand. I have geodatabases containing gSSURGO data, one for each state, in their own folders. I have a ...
0
votes
1answer
22 views

Joining rainfall data to point features using ArcPy?

I have 180 point feature classes with rainfall totals. Each feature class represents one days rainfall for a region and has around 36K points (think of each point as a weather station in the region). ...
-3
votes
0answers
26 views

Transformation of Feature dataset list [closed]

I have a input.CSV file and first column consists list of feature dataset and input.csv consist of 5 rows and 1 column. EMI_EMF Cultural Resources Hazardous Materials Parcels Footprints Now I ...
1
vote
1answer
31 views

Creating multiple Feature Datasets from table/list using ArcPy?

How to Create multiple Feature Datasets from a table/list. I can create a single feature dataset in a geodatabase with this python code. import arcpy from arcpy import env env.workspace = ...
-4
votes
0answers
24 views

geographic information systems parcels automation [closed]

I need a python script to automate a workflow. I have a parcel feature class that i receive information from planning and also from county. I only want to extract certain fields from each entity. ...
1
vote
2answers
67 views

How to create a new field with a combination based on another field with arcpy?

I like to create a new txt which has two columns: Id and GRIDCODE. This is the original Table: The Id column of the new txt should have just unique values. I’m able to do this with the following ...
1
vote
1answer
27 views

ArcGIS 10.2 arcpy — how to import/install win32com?

win32com used to be included with arcpy 9.x but no longer. I used to use it to manipulate excel occasionally. I downloaded and let win32com install itself and then tried to follow some online ...
2
votes
1answer
65 views

ArcGIS “Merge” tool is slower on arcpy than when starts it with ArcGIS interface

I am writing python script on ArcGIS 10.2.2 and found some strange bug. I use merge tool to process 498 shape files (they are located on a hard drive). Using arcpy script it takes 6 minutes, but when ...
1
vote
1answer
30 views

how to create a multipoint geometry in arcgis using python and arcPy library

I have specific points and I need to create multipoint geometries, in a model-builder python script, following an equation that provides me the new (x,y) points around my initial point. Is there any ...
2
votes
1answer
32 views

Calculating geometry area in ArcGIS for Desktop using ArcPy?

I have a polygon shapefile and I want to write a Python script to add a field named "area" and calculate its geometry areas. The script is like this: ...
1
vote
1answer
31 views

Add annotation feature class to mxd with arcpy

From what I have researched, I'm pretty sure the answer is NO, but I want to make sure no one has found a work-around. Annotation feature classes in personal geodatabases need to be added to mxds. ...
0
votes
1answer
34 views

Cause of ExecuteError: ERROR 000539: Invalid field County Insets.OBJECTID Failed to execute (CalculateField)?

The following script joins two layers on a common id and attempts to use the OBJECTID in the joined table to update records for a field in the input table. In running it in "current" mode, it moves ...
2
votes
0answers
32 views

arcpy with multiprocessing throws “UnpickleableError: Cannot pickle <type 'geoprocessing Layer object'> objects”

I'm attempting to speed up a process which is currently running synchronously, by using the python multiprocessing module. I'm having trouble sending a feature layer to a function which is called by ...
0
votes
1answer
35 views

arcpy SearchCursor return a OBJECTID value not as an integer

I use summary statistics GP tool to extract the max OBJECTID from a feature layer. After that I use arcpy SerachCursor to get the OBJECTID value from the statistics, but the result returned is not an ...
1
vote
1answer
33 views

Maintaining reference to feature layer (rather than its name string) throughout Python script? [duplicate]

When creating a Layer in arcpy, the syntax uses a string to denote the layer name, as shown in the Make Feature Layer sample script: import arcpy arcpy.env.workspace = "C:\Program Files ...
1
vote
1answer
46 views

Why does arcpy.TableToDomain_management require exclusive schema lock?

I'm talking about arcpy.TableToDomain_management, ArcGIS Server 10.2 It seems that this function requires exclusive SDE database schema lock. Something that we can't accept. We have ESRI domains but ...
1
vote
1answer
38 views

Populating Access (*.mdb) table with text from Text Elements to inventory MXDs using ArcPy/Python?

I am trying to write a piece of code to populate an Access mdb table with information from text elements in an mxd (text elements all have "names"). The purpose of this is to create a catalog of my ...