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

learn more… | top users | synonyms (7)

2
votes
1answer
360 views

stratigraphic ranking with field calculator?

I would like to populate a feature class float attribute with a numerical ranking of a text attribute of a geologic map. I have a field named [sheet_unit] with strings such as "H10, Q" and "J10, Pl" ...
2
votes
1answer
66 views

Implementing UpdateCursor?

I previously asked Updating attribute information about this script last week. I have amended it and am confused. I need to write the ADMINAREA value to the empty LOCALITY fields from TWB_Suburbs to ...
2
votes
1answer
69 views

Script slow because of conditional statements

I have created a Python addin for ArcMap. It has two comboboxes. Combobox1: Search for facility by name. If there is one facility with that name the mxd zooms to the selected extent. Combobox2: ...
2
votes
1answer
46 views

Cannot perform buffering loop with arcpy

I have 5 buffers to perform using 5 fields of a shapefile. I try to run it with the following code: Buffers = ['JF1','JF2','JF3','FF','FB'] env.workspace = "C:\Mydirectory\Myfile.shp" network = ...
2
votes
2answers
101 views

ArcPy Field Calculation within Loop

I am writing an ArcPy script that will run from a tool with user inputs. The user will select an input layer and output name/directory. I have my current code below. The tool will then do the ...
2
votes
1answer
54 views

Trying to make many polygons from points? [closed]

I am trying to turns points into polygons, but I encounter this challenge : My data set has 1000 entries. Each entry has 360 associated columns, each with a coordinate pair. When connected, these ...
2
votes
1answer
55 views

Updating multiple fields with list values using arcpy.da.UpdateCursor

I have a script that contains a function that fetches XML from a web service, containing a series of metadata values. The function takes a field from a feature class as criteria, queries the web ...
2
votes
1answer
81 views

Making a tool from script, arcpy.Project_management () comes with an error

I have a script (just a fragment here, up until the line after which the error comes up): import arcpy from arcpy import env arcpy.env.workspace = arcpy.GetParameterAsText(0) ...
2
votes
1answer
43 views

Change Date to Future Date in Map Title Using Python or Dynamic Text [duplicate]

I'm trying to create a dynamic map title in ArcMap that updates based on current day + 2 days. For example, if I run the code on the 20th of a given month, the title should update to show the 22nd. ...
2
votes
1answer
56 views

Polygon scaling using arcpy

Is it possible to scale each polygon by a numeric value in an attribute table field using arcpy. I have updated the code from some previous excellent work done by Evil Genius import arcpy import ...
2
votes
1answer
74 views

Developing find and replace script tool?

I'm being tasked for developing a script tool that can find ultimately needs to be able to find any string and replace it with another string in an attribute table. Below is what I have so far, and it ...
2
votes
1answer
78 views

Accessing layer properties with arcpy

I have a process that I'm trying to streamline. On a regular basis I have to produce ArcPad base maps for low end GPS units. The area that I need to cover is very large (ca. 7 million acres). I've ...
2
votes
2answers
92 views

Why does FeatureClassToFeatureClass work in ArcMap but not in Python script?

When trying to copy a feature class from an SDE connection file to a scratch GDB, the FeatureClassToFeatureClass_conversion works in the ArcMap Python window, but I can't get it to work in a Python ...
2
votes
1answer
67 views

Filter the Feature Layer parameter in Python Script Tool

I have a Python script tool where I have a parameter of type Feature Layer because I want to have the already opened layers as a dropdown list. I was wondering if there is a way to filter this ...
2
votes
1answer
44 views

Arcpy “print” works only the first time [duplicate]

I am running this extremely simple code using the ArcGIS python environment: import arcpy test = r"C:\....\New_Shapefile.shp" #test contains several fields, including one called "Number". ...
2
votes
2answers
101 views

PackageLayer_management failing within script, needs to run outside of an ArcMap session

I'm automating a workflow that requires outputting a layer package, it throws the general ERROR 999999 when executing and breaks. It does, however, generate a folder in the correct directory, with ...
2
votes
2answers
83 views

Column does not exist - python

My goal is to count the number of wells in each county. I've verified the columns are correct as listed in the attribute table. Do I have a typing or formatting error? I wanted to pull county names ...
2
votes
2answers
107 views

AttributeError: 'Layer' object has no attribute 'listLayers'

I want to use the result of OD cost matrix for my further calculations. However, whne I try to extract the sublayer "lines" it returnes an error AttributeError: 'Layer' object has no attribute ...
2
votes
1answer
69 views

Concatenating Attributes of Points in Same Location using ArcGIS for Desktop?

I have a single feature class that contains multiple points with the same location, but different names and text attributes, and I would like to concatenate the attributes together and merge the ...
2
votes
1answer
30 views

NAME is not defined when defining class arcpy

I am having an issue I have not had before creating a class with a method as below; class Points: def __init__(self, inFC, buffDist, sector): #Must have a set of points and a value to buffer these ...
2
votes
1answer
105 views

How to compute zonal statistics fast?

I have 12000 circles with a radius of 50 miles on a raster with 0.05 degree resolution. Global analysis. The raster is 32 bit float and I have to calculate zonal statistics for 20 different rasters. ...
2
votes
1answer
62 views

Only Black & White text in Python editor in ArcGIS for Desktop?

When opening IDLE or Pyscripter in ArcGIS by right clicking on a toolbox and Edit... the specified editor opens with the code - BUT all text is only black and white not the context colors of blue, ...
2
votes
1answer
94 views

How to properly handle a multi-column value table in an ArcGIS Python toolbox?

I am building a relatively simple python tool for ArcGIS 10.3 which will automate the process of generating summary statistics for multiple raster datasets, for polygons in a polygon dataset, using ...
2
votes
3answers
99 views

Updating coordinates of vertex in polyline using Python and ArcGIS for Desktop?

I want to update the point coordinates which are not correct on polyline. I tried many times to update it using python, but my script didn't work. The first attribute table is the station_id and its ...
2
votes
2answers
98 views

Numpy error when computing scores based on percentiles

I want to calculate scores in one field based on the percentile (in steps of 10) the row falls into in another field. I found a solution here (Calculating Percentiles in ArcMap?) that I tried out, ...
2
votes
1answer
120 views

Python script: “points to polygons” skipped fourth vertex

Using ArcGis 10.2 I have a script converting the nodes of a net into polygons. The polygons should be either triangles or rectangles but the script doesn't build polygon as rectangle, skipping the ...
2
votes
1answer
61 views

Disable column of Value Table in Python Toolbox?

Can I disable a column based on another column? Let's say I have a column to choose a field type (Short, String and so on) and a second column to choose the max length of a string. I would like to ...
2
votes
2answers
101 views

Provide credentials for Oracle database when opening MXD file?

I need to open a MXD file from a Python toolbox (so that I can automatically export it to a PDF). The file contains a connection to an Oracle 11g database, and I need to somehow provide the ...
2
votes
1answer
80 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 ...
2
votes
2answers
70 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
1answer
54 views

Rename feature classes in file geodatabase in bulk

I see may versions of this post but none quite get me to where I need to be. I have 50,000 features classes in a file geodb. They are a1_xxxxx_xx I need to rename them all to a6_xxxxx_xxx This is ...
2
votes
1answer
525 views

Standalone Python script to split a polyline with a point layer

I have a polyline layer and a layer of points that are on top of the polylines. I do not have the ArcGis advanced license so I can't use the Split Line at Point tool. Can someone help me with a ...
2
votes
1answer
332 views

Python toolbox - keep parameter value updated after re-altering parameters

I am writing a Python toolbox with (among other) 3 parameters: 2 boolean (check boxes) and 1 string. The string parameter's properties depends on the 2 booleans' value: If at least the first boolean ...
2
votes
2answers
161 views

definition query with 3 plus variables to loop with python and save layer files

I have a script that takes an input feature class and uses a field within this class to create a definition query for each unique field. A question on how to do this is listed below saving layers for ...
2
votes
1answer
81 views

Replacing layer ArcSDE connection

I am very new to using Python... I have an MXD with all of my layer files in it. They are grouped by category etc. Each layer file references a dataset within my SDE. My SDE has two different ...
2
votes
1answer
170 views

problems overwriting files in ArcSDE with python script

I'm having a great deal of difficulty overwriting files when using ArcSDE. The usual 'arcpy.env.overwriteOutput' method doesn't seem to work. When I run this script: import arcpy from arcpy import ...
2
votes
1answer
113 views

Simple Folder to folder batch python script

I am writing script to take shape files from a folder to Buffer it to given distance to Output folder with same name as input files. Here are block of codes. # Name: Buffer_multiple file.py # Usage : ...
2
votes
5answers
241 views

Create Statewide Hydrologic Soil Group Map

This may be better for Engineering? Not sure. Background: Previously I have downloaded SSURGO soil data for the state of Pennsylvania by downloading each county and merging the shapefiles. I then ...
2
votes
1answer
89 views

Multiple Ring Buffer in ArcPy Generates Single Ring

I'm running a simple multiple ring buffer using ArcPy. My goal is to generate a multi ring buffer for each pond in my dataset of 50,000. Here's the line of code: ...
2
votes
2answers
483 views

Accessing multiple shapefiles in folder using Python and ArcGIS for Desktop?

I have been asked to create a custom script to reproject shapefiles (different projections) from a folder, but can't contain values such as filenames and path names to access them. I have started ...
2
votes
1answer
1k views

Using Python add-in wizard with ArcGIS 10.3 for Desktop?

I'd like to create an add-in for ArcMap (ArcGIS 10.3) using Python. Unfortunately, the wizard does not seem to have been updated for 10.3, which is the only version Esri provides for download at ...
2
votes
1answer
243 views

Python tool won't stop running— Not an infinite loop issue

I'm having trouble with a python script. It is essentially a near duplicate of another script which is running fine-- it is using different files, but apart from that the tools used and the order in ...
2
votes
1answer
790 views

Using ArcPy to Read from Excel Spreadsheet to Python Dictionary

How would I go about creating a script that reads a specified excel spreadsheet and places the values in a dictionary? I have read about the xlrd library and how the library in such endeavors to read ...
2
votes
2answers
612 views

Cannot convert string to int using ArcPy Calculate Field

When I load a csv file to join with ArcPy, it converts all string fields that are numeric to integers. Therefore, I have to add another field within the feature class that I'm using for joining that ...
2
votes
1answer
272 views

Using ArcGIS model to batch export set of layout view as JPEGs?

I have a large number of layout views I would like to export as JPEG maps using ArcMap 10.0. The layout view is based upon a user defined grid. Normally what I would do is manually select a grid, ...
2
votes
3answers
1k views

How to update the Z value using an UpdateCursor?

I have created the following script to mimic the ArcGIS 3D Analyst tool, FeatureTo3DByAttribute, which creates a 3D copy of a 2D feature class and sets the Z to a specified attribute. import arcpy, ...
2
votes
1answer
130 views

Creating Branching Python Script, Based on Whether Feature Classes Exists or Not?

What I would like to do is create a script that checks the existence of a feature class and, depending whether it does or not does, skip to different process. This would need to be implemented in ...
2
votes
1answer
427 views

How is the Python IDE aware of arcpy?

I'm using PyCharm 4 for some Python scripting. When I type import arcpy I can immediately start using items within the arcpy namespace, like the environment & workspace objects. How does the ...
2
votes
1answer
187 views

Geoprocessing service fails if output paramter is empty

I have made a network isolation model that lets the user pick a point on the network to simulate a pipe 'failure'/section that needs to be isolated and finds all valves that need to be turned and ...
2
votes
2answers
684 views

Add multiple Layer files in subdirectories to mxd using python

I have more than 300 layer files located in many sub-Folders and sub-sub-Folders. All Sub Folders are located in one large directory.I read Use python to add layers to TOC and I try, with arcpy, to ...