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

learn more… | top users | synonyms (7)

0
votes
2answers
51 views

Multiple rename shapefiles and feature classes in python

I have multiple shapefiles, in different sources (D:\GIS\Folder A", "D:\GIS_Temp\Name". And some of them have space in their name (File X, File Y, etc). What should be the code that could rename all ...
3
votes
2answers
57 views

Having two input feature layers and derived output feature layer in ArcGIS Python Toolbox tool?

I'm unable to find an example of an ArcGIS Python Toolbox similar to the one I'm trying to get to work. The standalone python script works beautifully. Turning it into a Python Toolbox so I can use ...
2
votes
1answer
66 views

Select by frequency

I've got a number of shapefiles with some redundant data. I'm looking for a way to select where a single attribute occurs more than a certain number of times (in this case four) and remove them from ...
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: ...
0
votes
1answer
42 views

How to run in background an .exe program withArcGIS? [closed]

I am working with the ArcGIS program that reads Python language. For that I've already implement scripts as script tool on the ArcGIS. Now I need to run in background an exe program "gams". Is it ...
3
votes
0answers
24 views

Get results for each topology errors for Polyline or Points? [closed]

When you set up a topology to build topology rules for each polyline, or points, is there a way to get the results or summary for each Line Errors? For example, when you set "Must Not Overlap", ...
1
vote
2answers
21 views

trying to update empty string field with a string

I need to update a column of values such that empty fields are changed to the string "OFF_ROAD." I've looked up a plethora of examples, and this is what I'm trying to get to work, but when I run it, ...
3
votes
0answers
39 views

Python with ArcCatalog for Table or Geography view? [closed]

Is there a way to automate the preview tab in Arc Catalog using Python? Say if I wanted to preview the geography of a feature class where I have the path and just don't really want to connect to the ...
1
vote
1answer
37 views

Problem in reading mosaic_dataset path from a csv file

Based on this How to batch Check geometry in ArcGIS for a list of datasets from a CSV? code, i'm trying to extract the mosaic dataset path's within multiple folders. If i directly provide the ...
5
votes
1answer
83 views

How to add Unique ID number to a list if rows contain a consecutive sequence (Arcpy)

I am trying to use an Arcpy Python code to identify the Unique ID number for streets that contain consecutive addresses and ignore rows that do not. For example: FULLST | LOR | HIR | UID Gate ...
2
votes
2answers
53 views

Parsing new field into calculate field

I have a pivot table that has 11 ShipTypeGroup fields with "Long" field properties that cant be divided by 12, due to decimal places. Therefore I am trying to create a new field, copy attributes ...
2
votes
1answer
32 views

Arcpy tool attribute selection

I'm trying to make tool of change detection between two polygons layers by fields of initial state and final state. Everything is working except attribute selection, I would like user could choose ...
0
votes
1answer
35 views

Alternative to raw_input on arcgis

In python only, I use S = float(raw_input( 'Insert the value: ') when I want allow to user insert a value then is used in that script. When I try to use the same on a python script that I've already ...
1
vote
1answer
61 views

Arcgis 10.2.2 Python Addin - Add Layer to Layout View?

I've developed a python addin toolbar that adds a desired layer file (chosen from a button nested in a menu in the toolbar) to the table of contents in a project. The functionality only works, ...
0
votes
1answer
27 views

Arcpy buff does not provide the output attribute “Shape_Area”

I made a loop to buffer several times a certain network using arcpy. What I noticed is that when I run the code, the output files do not have the attribute fields "Shape_Area" and "Shape_Length" that ...
0
votes
0answers
22 views

ArcSoc used up its stack

My published Geoprocessing service crashs always when I start it. Now I found the following error in the dump file: Error Message: The thread used up its stack I didnt use any loop in my arcpy ...
2
votes
0answers
28 views

How to get 4 values for different Indexes and names of rasters for set of points? [closed]

I am trying to get 4 values for different Indexes and names of rasters for set of points, but get problem with defining function def extractIndex(raster, pathName). #List of Folders 4 Folders ...
-1
votes
1answer
42 views

Listing Points Within Polygon for Hadoop? [closed]

I am very familiar with a point in polygon analysis but instead of counting how many points are within each polygon. Does anyone know how to list the points within the polygon and add a field that ...
1
vote
1answer
37 views

How to export list of feature classes in multi gdb's to a csv file?

Using the codes mentioned here How to list feature classes in multiple geodatabases in a folder? i was able to list all the feature_classes in multiple geodatabases within a folder. Problem is i don't ...
4
votes
0answers
44 views

Geoprocessing Service crash while executing

I have created a geoprocessing service, which can print a webmap(JSON) to a PDF or PNG. The ArcGis for Server and ArcGis for Desktop are running on my workstation. The Website, which host my webmap ...
1
vote
2answers
48 views

Arcpy fail to loop between files in different directories

I want to perform a loop of intersections between different files in different directories. Here is my code: Intersects = ['Name1','Name2','Name3','Name4','Name5'] #Names of my files ...
1
vote
0answers
20 views

Using arcpy to loop through multiple network analysis tasks

I am writing a script with ArcPy to look at modelling closed roads and the length of possible diversions. This is being done with the network analyst tools. The basic process I am using is to: ...
1
vote
1answer
36 views

Creating new layer in ArcGIS for Desktop with Python Toolbox?

I would like to create new shapefile layer or memory layer with one point with certain coordinates in ArcGIS 10.2 with Python Toolbox. Which function should I use? I wrote this code: import arcpy ...
1
vote
0answers
38 views

Import csv value to an empty field in a point feature class

I have a .csv with three colums and a point feature class with an empty field that i would like to fill with a value of the csv. In the .csv i have 15 rows with a code. In the feature class just one ...
0
votes
2answers
27 views

Getting name of raster in point shp.file Attribute Table using ArcPy? AttributeError: 'unicode' object has no attribute 'contains'

I am trying to get name of raster for corresponding point if point belongs to raster and fill column "name" in points Attribute Table: but no names in Attribute Table column "name" of point's ...
2
votes
1answer
24 views

How to save output in different file after clip

I am new to GIS. I have several rasters in one file location I am using clip tool to loop over several rasters in arcgis. When I start I am choosing workspace, which is the folder where my input ...
0
votes
1answer
53 views

Attribute table updating using ArcPy cursors?

I have a line type shapefile representing the road network of a country. That the country has experienced more change in the road names is why I want to create a script that will help me make update ...
1
vote
2answers
115 views

Scripting (Python) Feature Class content into Shapefiles following an UTM data structure

Consider a Feature Class and two of its fields are "UTM_grid" and the "OID". Scripting with python 2.7 for ArcGIS 10.3. "UTM_grid" field contains the geographic info (e.g. B1SD40B) and was broken ...
3
votes
0answers
82 views

topology problem in the python script(arcpy)

I'm using Python 2.7 and ArcGIS 10.1. I have one topology problem in my Python script and I don't know how to fix it. I have one road and I want to select polygons with a query where intersect with my ...
2
votes
1answer
47 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 = ...
3
votes
1answer
51 views

Python script to print the feature classes which are referencing AGS map services

I have an AGS site and need to identify which feature classes in my SQL Server DB reference the AGS map and feature services. I am not familiar with this environment and would like to automate the ...
1
vote
0answers
26 views

Classifying a Raster with Unique Values from Existing Layer File and Dynamically Change Labels - How to Create a UniqueValues Raster Layer File?

I'm creating a python tool that needs to have the output raster added to the current map and symbolized using unique values. I have been able to accomplish this by creating a template layer file and ...
3
votes
1answer
35 views

Building a tool to both geocode and do topology check on the geocoded point (ArcGIS)

Never built a tool in ArcGIS. Would someone tell me if it's feasible to create a single tool (preferably using Python) which: Geocodes an address Checks to see if geocoded point falls within a ...
1
vote
1answer
26 views

string u' encoding problem

the goal of my program is to retrieve data from a field one after another at the end to compare with other values of another table when I execute the code that allows me to point to the values of the ...
2
votes
3answers
150 views

arcpy codes to write ranked values

I have a dataset with ranked attributes(e.g. very low, low, moderate, high, very high). I would like to write a python code using arcpy to give a numeric values to each rank, such as 0,5,10,20,50,100. ...
1
vote
0answers
70 views

Command works in Console, but not in Python Toolbox

I want to create a memory layer with points in ArcGIS with Python Toolbox. I found an in_memory function. Here is the question: Why this command works in Python Console in ArcGIS, but not in Python ...
0
votes
0answers
38 views

Python script iterator to interpolate accross multiple fields of attribute table

I interpolated precipitation data in ArcMap (ver. 10.2) using a surface-fitting tool [e.g. Global Polynomial Interpolation (GPI)]. I built a GPI model using model builder in ArcGIS 10.2, but the model ...
3
votes
0answers
56 views

Arcpy code only works when run in two chunks, not as one piece

I have a weird thing happening with my script. When I copy/paste it into the python cmd line within ArcMap, I get error messages. However, if I run the first part, then copy in the very last line by ...
1
vote
2answers
34 views

Changing ArcSDE version of *.mxd in ArcPy?

Is there a way to switch the version a .mxd data source is pointing at without using arcpy.mapping.findAndReplaceWorkspacePaths? I have a script that automates map book production that works very ...
2
votes
2answers
47 views

editing and manipulating tables with python

I’m new to ArcMap and was wondering if anybody could help me out. I have a shapefile with counties and wells in that county. In the table I’m trying edit it so that for each county calculate the total ...
6
votes
2answers
149 views

How can arcpy to be interactive?

I'm developing an interface with arcgis and python. When I have only python, I can become my script interactive using: S = float(raw_input( 'Please enter the value: ')) I can open and run my ...
1
vote
0answers
26 views

Scripting cursor updates to ArcGIS Online feature is somehow failing

I'm charged with maintaining QA logs embedded in a feature on ArcGIS Online. Basically I just have to change some fields in the feature. The problem is that I wrote scripts using cursors to update ...
2
votes
1answer
38 views

Multiple Input Feature Classes with Different Names - Model Builder

I have created the model below to create "straight lines" from a route (Feature Class is the Route in the model). This model will save me a lot of time compared to doing it manual. The manual steps ...
1
vote
1answer
47 views

Using Editor tools in Arcpy script

I would like to create a custom merge tool that merges 2 polygons within 1 feature class together. I want to have a tool that merges 2 polygons and adds up a specific attribute. Is there any way to ...
-1
votes
1answer
23 views

ArcPy Customize Legend Error - NameError “Not Defined”

I'm trying to use ArcPy to apply a custom .style template in a map legend. First, the code uses a for loop to search the layers in the map and, if the name of the layer is called "Temperature", ...
1
vote
1answer
47 views

Comparison between two fields of two tables using ArcPy cursors?

I would like to make a comparison between two fields of two different tables with a Python script. Fields for comparison are ROAD_NAME and NAME.ROAD. The idea is to check whether each element of ...
-1
votes
1answer
28 views

Script Convert KML to Layer [closed]

I have a KML file (https://meocloud.pt/link/a60a4408-0b89-4163-9a4d-c91c181bbab4/ROI.kml/) and I want to convert to SHP in ModelBuilder using this script that I found on-line, but it doesn't work. Can ...
4
votes
1answer
169 views

Generic error on an “if” in arcpy

My code has to check if a value in a shapefile attribute table belongs to a certain group of landuses. Below I paste my code: cursor = arcpy.SearchCursor(buf_intersect) fields = ["GTYS_Branc", ...
1
vote
0answers
59 views

Debugging looped python script (updating picture element link)?

Can anyone help with the following script? It's goal is to list every mxd in a folder, list picture elements in them and the change the path for a specific element. Here's an update version of the ...
0
votes
0answers
23 views

Reprojection script failing after running once

This is related to Getting Error 999999 from arcpy.SpatialReference.name? @Aaron gave me a workable solution. I refactored the script afterwards and it ran once successfully. When I reran it in the ...