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

learn more… | top users | synonyms (7)

2
votes
0answers
535 views

Cost Path tool in script randomly throws error

I have a script tool that is creating a least cost path for sets of points using a Cursor. When applied, the script runs great, except every so often the tool is stopped because there is an error in ...
2
votes
0answers
275 views

Different results from Spatial Analyst GP Tool and Python

I am writing a script that has to subtract one raster from another. The rasters I have represent 1) Parking Lots (1 = Parking Lot, 0 = not Parking Lot) and 2) a buffer around the Parking Lot (1 = ...
2
votes
0answers
55 views

Difficulty in running the script

I have developed a script tool for adding a layer in the current map document. It did not work.. The message is "Completed script addlayer...". But there were no layers added in the TOC. Another issue ...
2
votes
0answers
765 views

Why does Clip analysis generate (some) empty output?

I am running a script that is working (see below) - it pulls a file from a folder, clips from that file based on an intersection with another file, and creates a new shapefile in a new folder. It has ...
2
votes
0answers
413 views

Can not get text element to update?

I can not get text element to update? Text ELement has been added "Subdivision" Still not updating?.. class ButtonClass2(object): """Implementation for FemaMapper_addin.button (Button)""" def ...
2
votes
0answers
165 views

Problem to transform events from one route to another

I have a road feature class layer containing parts like 1_10, 1_20. 2_10, 2_20... etc. 1_, 2_ is later used to create the route and _10, _20 is indicating the direction (the road feature classes were ...
2
votes
0answers
439 views

How to Load a Record Set Parameter in a tool dialog

I am trying to create a tool that allows a user to update a table row without starting an edit session. I have a script tool set up with a record set parameter and I use this set up to add new rows to ...
2
votes
0answers
2k views

Why am I getting an ERROR 000728: Field *fieldname* does not exist within table even though field exists?

I do some script for a shapefile's table. And this script works for 2 fields and do not for other ones, because of: ERROR 000728: Field FID_158_01 does not exist within table But this field is ...
2
votes
0answers
382 views

ArcGIS/arcpy: Geometry object comparison methods not working. Do they take z values into account?

I have an arcpy script that makes calculations based on an input PolygonZ feature class. What I need to do in several places in the script is test whether a point falls within a polygon in 2D. In ...
2
votes
0answers
207 views

How can I draw an ellipse filling the dataframe with ArcPy?

I need to modify one of my template scripts to draw a circle from the centre of the (inset) data frame to the edge of the data frame. This will then be used to clip the data frame to shape. I'm using ...
2
votes
0answers
419 views

On using R data with ArcPy to make histogram in ArcMap

I am writing a tool in python which passes parameters to a R script, which in turn creates a DBF file. I read this DBF and want to make a histogram out of the data inside ArcMap as one of the results ...
2
votes
0answers
106 views

network related issues arising when running an arcpy script

Essentially I wrote an arcpy script that is within a toolbox that I ported over to a different machine to test out after the script worked locally. The script essentially utilizes the psycopg module ...
2
votes
0answers
199 views

Is there any way to suppress the calculate field dialog box in arcpy script?

I've got a python script that I inherited. The python script takes input from a variety of feature classes and tables and spit it out to a single table. When I run this script via a scheduling ...
2
votes
0answers
766 views

ArcGIS 10.0/arcpy: Can't retrieve the points in a polyline geometry obect: any idea why?

My arcpy script builds a Python dictionary, dictCLPnts, that holds the geometry objects of a polyline feature class. The following code snippet shows the attempt to access the geometry object with ...
2
votes
0answers
1k views

Perfectly running python script gives error when run from web.py

I have the following python script which runs perfectly if run separately: import arcpy val = arcpy.GetCellValue_management("D:\dem-merged\lidar_wsg84", "-95.090174910630012 29.973962146120652", ...
2
votes
0answers
811 views

Spatial Analyst Cell Statistics seems to give the wrong answer in ArcGIS 10.0

I have a script that calculates standard deviation for a list of grids using the Cell Statistics function in Spatial Analyst for ArcGIS 10.0 The syntax is this: stdevGrid = ...
1
vote
0answers
15 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
0answers
36 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 ...
1
vote
0answers
21 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 ...
1
vote
0answers
65 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 ...
1
vote
0answers
21 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 ...
1
vote
0answers
54 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 ...
1
vote
0answers
26 views

Arcpy Result object - status Waiting, Cancelling, etc?

This is a question similar to Using ArcPy Result object associated with Currently Running Script. I'm curious about how result objects in arcpy can have certain statuses that indicate a geoprocess ...
1
vote
0answers
34 views

How do I edit stretched raster legend labels using arcpy?

I'm trying to edit a stretched raster legend item to only show values instead of the "High : " and "Low : " that are standard. I've created a layer template that doesn't include the high/low in the ...
1
vote
0answers
27 views

Installing Python/site packages on LAN server

I'm going to be sharing an ArcGIS script tool with coworkers and I want to store all necessary mxds, gdbs, and script files in one folder on the server so the file paths are absolute. However, the ...
1
vote
0answers
48 views

arcpy symbologyType is always OTHER, but I need UNIQUE_VALUES

I am trying to load a TIF file to the mxd using arcpy, then add a definition file to map colouring. For one layer I have the problem, that the amount of values will always be different, sometimes it ...
1
vote
0answers
39 views

ArcPy Dissolve Statistics Fields - fixed into variable

How can I change this fixed POP column into my variable: field = parameters[1].valueAsText. It says syntax error everytime. StatField = "POP MIN;POP MAX" arcpy.Dissolve_management(in_features, ...
1
vote
0answers
39 views

Arcpy create feature class representation

I have written a script which allows me to select multiple feature classes and apply both a representation (based on a template layer) and set a transparency value before adding to the map. ...
1
vote
0answers
105 views

Python with ArcGIS: import scikit-learn fails (bad numpy.dtype)

I am trying to install scikit-learn 0.17.1 (current) into my Python 2.7.3 that accompanies my ArcGIS 10.2. The installation through easy_install goes through smoothly, but I get the following error on ...
1
vote
0answers
41 views

Select Layer By Location (Management) gives different result in ArcPy and ArcMap?

I have two line Shape files. When I use the Select layer by location tool to select two intersecting lines, it works fine and selects only lines which are actually intersecting. But when I use this ...
1
vote
0answers
45 views

Adding multiple fields to feature classes in enterprise geodatabase using ArcPy?

I am very, very new at python and am trying to put together a tool that can be run on an enterprise geodatabase that will add a series of fields to each feature class. So far I have only been able to ...
1
vote
0answers
28 views

Size of the Output Files Cannot Match After Converted From Polygon to Raster

Basically, the emodisfile is the raw data file, and shapfile is one of the CLU shape files. I need to convert the shapefile from polygon to raster and then to ASCII file based on the emodisfile. So I ...
1
vote
0answers
42 views

delete feature classes with a similar name in arcpy

I have a script that does a dissolve on polygons with a common field. I'm only interested in keeping the outputs that contain more than one polygon. I'm new to python and having trouble writing a ...
1
vote
0answers
66 views

How to automatically run python code at the time when a mxd is saved?

I am trying to find a way to execute a few lines of (preferably python-)code whenever I save a specific mxd (my template.mxd) I'm working with arcgis desktop 10.3.1 (advanced, all extentions) What I ...
1
vote
0answers
35 views

Arcpy - Why does multi_user_mode have to be False in an edit session on non-versioned dataset?

I'm in the process of implementing Mintx's answer to my question What would cause a geoprocessing service to say "Cannot Open 'FeatureClass' Failed to Execute"? However, I had ...
1
vote
0answers
28 views

A mesh points for each polygon: how to create function?

I want to use function for creating a mesh point for each polygon, but I am new in python. what is wrong with the function: def creatingPoints(minX, minY,maxX,maxY,number): while minY < maxY: ...
1
vote
0answers
58 views

Looping spatial join in arcpy - order problems

I developed a python script where the user inputs a polygon shapefile multiple point shapefiles and within the script the polygon shapefile is divided into 1000mx1000m grid cells and the point ...
1
vote
0answers
23 views

Can't display raster in mxd as RGB

I have a script that iterates through a folder of jpgs, clips them to a grid, inserts them to an mxd, and exports them. My original problem was when I added the clipped raster from a standalone script ...
1
vote
0answers
50 views

Create symbology for new layer using Python (arcpy.mapping)

I have some ArcMap addin that creates new layer and add it into table of content. I need to set up a symbology for the newly created layer based on the attribute table (three differnet values > three ...
1
vote
0answers
57 views

How to display geoprocessing service results in an ArcGIS Online Map?

I am implementing a python script that filters features in a feature service. For this I used the following lines of code: import arcpy # URL with service, where clause and field parameter baseURL= ...
1
vote
0answers
35 views

How to transfer SQL variable back into ArcPy script?

I am trying to teach myself to access sql tables from an ArcPy script as part of a larger QC process. I am fairly certain that I have the sql statement correct (it works in SQL Server, albeit ...
1
vote
0answers
64 views

con statement outputs using arcpy.sa.Con doesn't ignore NoData

In ArcGIS 10.2, using the Con tool, I ran a conditional statement to return RasterA where RasterB value >0. That worked fine. Transferring the code into python, the statement reads something like: ...
1
vote
0answers
80 views

Using ReportLab with Arcpy

I am having some issues creating a geoprocessing service within arcmap using reportlabs pdf toolkit. The script runs fine outside of arcmap, however when i try and run it in arcmap to publish as a ...
1
vote
0answers
76 views

Arcpy doesn't recognize spatialite tables after editing with QGIS

I'm working on a project that would like to use spatialite as a go-between for field edits using QGIS/IntramapsRoam and then loading the data to a file geodatabase. The workflow is as follows ...
1
vote
0answers
50 views

Using row.setValue() function with arcgisscripting?

I'm trying to set column value NULL. I tried different ways to do that, I used CalculateField_management and UpdateCursor but i did not get success. when i used CalculateField_management. It says ...
1
vote
0answers
62 views

Creating Flooding depth Rasters at every feet

I am explaining the issue I am facing to automate the process. I have created a DEM from LIDAR and the Asset elevation is incorporated into the surface. Purpose of this task: Once I get the new ...
1
vote
0answers
92 views

Correctly Setting Spatial Reference for Geometry Objects when Geoprocessing

I'm attempting to find the nearest distance between a set of points, and a set of polygons. I don't want to use near tables because I have to do this operation for a large number of different ...
1
vote
0answers
32 views

Using arcpy to add several rasters

I need to do some raster/vector processing on some non-overlapping tiles. My python script needs to find the correct tiles and then extract the raster values and count them up. My script needs to be ...
1
vote
0answers
30 views

Counting Subdatasets in GRIB using ArcPy?

I'm trying to utilize the extractSubdataset_management tool on a large set of GRB files. Each GRB file has a different number of subdatasets. Is there any way to execute this tool on all subdatasets ...
1
vote
0answers
46 views

Zonal histogram script VALUE row suffix problem

I'm running 2 Python scripts. The first it is to apply Zonal Histogram to several rasters. The second it is for saving the Zonal Histograms to a text file. My problem is when the first script creates ...