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

learn more… | top users | synonyms (8)

7
votes
0answers
253 views

Automating creation of ServiceDefinition from Python script tool of ArcPy without broken project data source?

Summary: I can create a ServiceDefinition through ArcCatalog or ArcMap, but when I try to generate the ServiceDefinition through python, it does not copy the /data folder with it, thus the script ...
6
votes
0answers
128 views

How do I get layers' IDs using python?

I am working in an ArcMap session, I've checked the option to get an ID for each of the layers in my document, so anyone has it. Now, what I need is a way to get these values within a python script ...
5
votes
0answers
178 views

Configuration problem anaconda python in ArcGIS

I used Eclipse with PyDev to create a script in Python (windows 7 x64). My code runs perfect when I start the run in Eclipse, but when I add it as a Tool in ArcGIS 10.1, I have the following problems: ...
4
votes
0answers
104 views

Error after successful ArcGIS PrintTask

Using ArcGIS Javsacript API on one server to grab a PDF from a custom print service published on a different server. We have used the exact same script successfully on other apps/servers before with ...
4
votes
0answers
54 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 ...
4
votes
0answers
71 views

Cell Statistics standard deviation values incorrect

I'm having some issues with the Cell Statistics tool in a python script I am writing. I am using 30 years worth of global cumulative annual rainfall data as input and am getting strange values in some ...
4
votes
0answers
243 views

ArcGIS python toolbox: GPFeatureLayer parameter “loses” symbology type

I'm pretty new at ArcGIS python toolboxes. Here is one problem I've been fighting with for a while. I want to create an output layer (GPFeatureLayer) with a specific symbology (GRADUATED_COLORS) and ...
4
votes
0answers
218 views

Use ArcPy to identify annotation reference scale?

I would like to retrieve the value of an annotation feature class reference scale using ArcPy (under ArcGIS 10.1). I cannot find where this property is stored (tried to access using the describe ...
3
votes
0answers
50 views

Reading Jp2 compression level using ArcPy?

Is the compression quality level used to create a JPEG2000 image stored somewhere inside the file, and how to read it? I would like to know if my images where generated using a lossless compression ...
3
votes
0answers
86 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 ...
3
votes
0answers
60 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 ...
3
votes
0answers
67 views

Select IDLE 2.7 (not 3.4) as default script tool editor for ArcPy with ArcGIS for Desktop?

I'm trying to set my default editor in ArcMap (10.3) to IDLE 2.7, but despite using the 2.7 path, when I right-click on a script tool and select Edit, it opens IDLE 3.4:
3
votes
0answers
112 views

Dissolve Management in Python

I have a simple code that is pulling together polygon shapefiles from a Windows folder and merging them together into a single shapefile. In the same code, I want to add a dissolve command. My fields ...
3
votes
0answers
42 views

Recovering toolbar from disconnected window?

I've faced this problem many times. I created a python addin toolbar and installed it in ArcGIS 10.2 . I work on dual monitors in the office. If accidentally this toolbox is left on the secondary ...
3
votes
0answers
31 views

Mask out values in a raster based on standard deviation

Does anyone know (in Modelbuilder or python) how I can remove any values of a raster that outside of the range of three standard deviations? I have a lot of rasters so it would be quicker than ...
3
votes
0answers
76 views

ArcGis' python library (arcpy) are imported so long

python -c import time; t1 = time.clock(); import arcpy; print('{0} seconds'.format(time.clock() - t1)) 3.60283379862 seconds It takes this long each time i launch my script or test. Is there any ...
3
votes
0answers
15 views

Problem Importing CAD features using arcpy.MakeFeatureLayer_management?

When importing multiple CAD drawings using "arcpy.MakeFeatureLayer_management" and "arcpy.Merge_management" I encountered a problem. Drawings that have line weights and elevation values assigned to ...
3
votes
0answers
64 views

matplotlib show() suspends ArcGIS

I've written a python script to plot a cross-section from a DEM along a line. Everything works fine except when I Show the plot, ArcGIS hangs and I have to force it to close with Task Manager. I ...
3
votes
0answers
39 views

Why does my Validation Script continue to run when adding the result to the map?

I am in the process of developing a python script that creates a list available imagery for our project areas that would then allow the user to choose which imagery source they would like to add to a ...
3
votes
0answers
247 views

ArcPy QueryPointAndDistance: Incorrect Lengths?

Background: I'm currently trying to determine the chainage (distance m) of my points along a polyline (i.e. proposed railway alignment). A colleague within my firm assisted me with the following ...
3
votes
0answers
135 views

ArcGIS Solar Radiation Tool - How is Local Solar Time/Local Time handled as input to the “within-day” time configuration?

I am scripting hourly interval runs of the Area Solar Radiation Tool, and need a hand understanding how to account for Local Solar Time (LST) versus Local Time (LT) within the tool. First off, I ...
3
votes
0answers
716 views

Changing workspace path of query layer using ArcPy?

I'm trying to change the workspace path of a query layer using the code below and it always breaks. The layer is connected to a view in an Oracle Spatial 10g database. The database is SDE enabled ...
3
votes
0answers
510 views

SetNull in Python script for Arcgis assign 0 value

I am writing a script in Python where I assign to few Tiff defined in a function as inputRaster a NoData value as follows: whereClauseSetNull = "VALUE > 100" outSetNull = SetNull(inputRaster, ...
3
votes
0answers
135 views

arcpy.mapping.ExportToTIFF fails to render layer?

Has anyone else had this problem? I have an mxd file with two layers in it, one of which is fairly 'heavy' (i.e. takes a minute or so to draw). All layers are visible by default. I have the ...
3
votes
0answers
393 views

How to use Python's subprocess module in a for loop ArcGIS?

I am new to scripting with ArcGIS. Although this might be an easy thing for those that know Python well, I haven't figured out how to use the subprocess module in a script. I actually think I'm ...
3
votes
0answers
85 views

ArcPy: Initialize zero valued grid Raster and iteratively increment

I'm jumping right into ArcPy to help out a friend who needs to automate some ArcGIS work. The problem at hand can be reduced to the following pseudocode: accumulationRaster = SomeZeroedRaster for ...
3
votes
0answers
1k views

Cause of ExecuteError: ERROR 010067 from arcpy.sa.CostPath?

By using the code below that creates least-cost paths between several polygons, I obtain this error message: ExecuteError: ERROR 010067: Error in executing grid expression. Initalization failed ...
3
votes
0answers
465 views

How to extract zipped shapefile and check its shape type using arcpy module without writing on disk

I have a zipped shapefile saved on my disk. I want to extract it in memory and check the shape type. I'm using arcpy module and want to stick to only default modules comes with python installation. I ...
3
votes
0answers
262 views

python.multiprocessing and “FATAL ERROR (INFADI) MISSING DIRECTORY”

I have a question which is closely related to this old question here: python.multiprocessing and "FATAL ERROR (INFADI) MISSING DIRECTORY" I have also looked at this, which seems to relate ...
3
votes
0answers
80 views

arcpy adding time to Raster Mosiac Footprint

I am trying to create a raster mosiac for use in animating data over time. The current workflow is: Create .gdb (arcpy.CreateFileGDB_management) Create Raster Mosaic (arcpy....
2
votes
0answers
18 views

How to export specific DDPs from a set of DDPs?

I have a set of data driven pages and I would like to have a string parameter in the tool that allows me to export specific pages from the set of data driven pages. An example would be if I had a set ...
2
votes
0answers
48 views

ArcGIS Dissolve failing with small polygons

I have an arcpy script which clips (Clip_analysis) a shapefile of polygons to a grid square, converts any multipart polygons created to singlepart polygons (MultipartToSinglepart_management), runs ...
2
votes
0answers
30 views

Creating a Legend with arcpy and comtypes

I am relatively new working with python and arcobjects. Under normal limitations I know that you cannot create a Legend or any arcobject with arcpy.mapping. Is there a generic example of creating a ...
2
votes
0answers
17 views

How to create .sat files for .jpg tiles

I want to create map overlays for a TomTom GPS. Relief shading, ortophoto etc as map background while navigating in Map View mode. Instructions for creating custom overlay can be found here So far ...
2
votes
0answers
71 views

intermittent failures with SelectByLocation in an ArcPy addin

ArcGIS 10.2, Windows 10 this is the line that fails: arcpy.SelectLayerByLocation_management(WRS_layer, "INTERSECT", gridLayer, "", "NEW_SELECTION") The WRS_layer is in a file gdb, the gridLayer ...
2
votes
0answers
23 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: ...
2
votes
0answers
37 views

extracting raster using values

I have an original .tif file which has values ranging from 2 to 28. From that original .tif file, I am extracting cells having a value of >=10 using the following code: import arcpy, os from arcpy ...
2
votes
0answers
49 views

Extracting Mean from Raster and Writing to Table in ArcPy?

I am simply trying to extract the mean of each raster within a geodatabase and write the value to a table. I have done this successfully with another set of rasters, but now I keep getting the ...
2
votes
0answers
82 views

Benchmarking ArcPy / ArcMap Performance on different computers?

This project came out of my need to build a justification for a faster work computer. Before asking for new equipment I want to be prepared to show the increase in performance by adding RAM or more ...
2
votes
0answers
66 views

Reading feature class attributes with or without quotes in ArcPy?

I'm working on a script that clips a batch of feature classes by a selection made in another feature class. The way it works is by reading the clip feature fields, then allowing the user to select the ...
2
votes
0answers
85 views

arcpy.AddIndex_management error for in_memory variable

I am trying to optimize a script that uses addJoin_management. To do this efficiently, I am attempting to add an attribute index on the join table. I am getting a generic error when i do this though. ...
2
votes
0answers
92 views

arcgisscripting.ExecuteError: ERROR 001270: Consolidating the data failed

I am working on PuTTY and trying to create service definition file in server. My Python script is creating .sddraft but I am receiving 'Consolidating the data failed' error when I run stage service ...
2
votes
0answers
54 views

Arcpy.sa NoData issue with saving TIFF

Similar to the poster here, I am attempting to convert numerical NoData values to actual NoData cells. The solution in the linked question doesn't work for me, however, as when I use the save method ...
2
votes
0answers
76 views

Extracting Multivalues to Points from NETCDF4 Raster using ArcPy seems imprecise?

I'm getting some strange results in a multivalues to points extraction from a NETCDF4 layer from the MERRA reanalysis product. In particular, it seems like the values being assigned are way off in ...
2
votes
0answers
144 views

How to add a separator to an ArcGIS python add-in menu?

In several places (e.g. Making separator and button menu in customized Toolbar using ArcObjects?) I have seen it mentioned that the way to add a separator for add-in menus and toolbars is adding the ...
2
votes
0answers
83 views

arcpy RasterToNumPyArray causes shift in location of values

I am converting a couple rasters to arrays, then performing calculations on them. First step- polygon to raster. This creates a 1/0 mask that I can multiply the larger raster by. After noticing my ...
2
votes
0answers
81 views

How to save Result File from command line arcpy?

What do I need to do in order to get a custom arcpy script to save an execution run into the Results window, and/or just straight to an .rlt file directly? The script is run from the command line ...
2
votes
0answers
57 views

Spatial Analyst tools adding extra column of NoData

I've got a script tool in ArcGIS that runs Curvature and Aspect from Spatial Analyst, and the outputs of both contain an extra column. I've attempted to set the extent in the both the tool and the ...
2
votes
0answers
79 views

Cul-de-sac (curve) turns generation in flow for parallel lines using ArcGIS for Desktop?

I'm using ArcMap 10.2 and I need to generate a parallel lines within the polygon and connect them one to other with the curve, with the proper radius and return radius (the same as cul-de-sac tool ...
2
votes
0answers
99 views

Using ArcPy Python Add-In Interval Caller to do auto-refresh?

I am using this code set called pythonaddin_interval_caller (written by Jason Scheirer) to do some map refresh every several seconds. The code was designed for arcgis python-addin. The benefit of this ...