The act of setting up computing instructions, usually stored in a file and interpreted at run time.

learn more… | top users | synonyms (1)

0
votes
1answer
247 views

How to debug Background Processing Error from ArcPy & Geoprocessing tools?

When I run a script in the background or Toolbox tools I will get a Background Processing Error. The script isn't the issue because it's happened several times today. When it does crash it will ...
0
votes
0answers
130 views

Arcpy - change layer from sde connection to file geodatabase

We are copying data from our corporate office to field offices and we are creating a file geodatabase at these field offices. We are copying the layers that point to sde and they need to point to the ...
1
vote
0answers
168 views

Calculating the closest distance between two points in ArcMap 10.2

I am looking for a script to calculate the closest meter to a set of addresses. I have a feature class of meters and a feature class of addresses. I have populated the address with fields for ...
2
votes
0answers
103 views

How to call ArcPy script from Windows Service? [closed]

I'd like to call arcpy script from Windows Service. Here (Calling arcpy/python from .NET?) I read that I can load python script. What do I need to load arcpy script?
3
votes
2answers
276 views

Script or model to create random points having multiple minimum distances within a polygon

Given: A single part polygon, total number of points to place inside that polygon, and table specifying the size of each subset (number of subsets n >= 1) of that total number of points and each ...
1
vote
1answer
161 views

How to avoid setting env.workspace and other paths/settings all the time

I have some scripts that are constantly setting env.workspace of arcpy. Usually, I have a caller script(script1.py) that may call some other script (script2.py). I've created a file globals.py with ...
0
votes
0answers
106 views

Execute Sql Statement in SQL Server 2008 with ArcSDE connection

I'm trying to execute this SQL Statement to establish an SQL query in SQL server 2008 with an ArcSDE connection (ArcSDE personal use) but there is no result. The SQL statement is : Execute SQL ...
0
votes
0answers
28 views

Raster Calculator [duplicate]

Could anyone help me with some information on using the raster calculator functionality in the python console within QGIS. I need to apply a mask and compute zonal statistics on a few hundred tif's. I ...
1
vote
1answer
105 views

Batch Aggregate Raster using Python

Trying to write a python script to batch Aggregate a bunch of different rasters. get a Parsing Error Syntax error for line 11. # Batch Aggregate raster tool import arcpy from arcpy import env from ...
1
vote
2answers
160 views

Median value for a case within ArcGIS 10.1

Similar to this post (ArcGIS median value from a layer) I am looking for a toolbox to get the median value for a data field by a case. For example, say I have dataset with percent tree cover for each ...
1
vote
0answers
39 views

Is it possible to create a geoprocessing package from a script tool that runs and EXE?

Following the guidelines from the following link, you can create a script tool from an executable . . http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//0001000003t6000000 ...
0
votes
0answers
50 views

Arcpy - loop through subfolders and change mxd settings [duplicate]

I'm trying to run a python script that uses arcpy and os.walk modules. The aim is to find all mxds by specyfying top workspace level only and for the tool to loop through all subdirectories and locate ...
1
vote
1answer
109 views

Improve Python script logic/structure for erasing features with arcpy

EDIT: Too big a question, I think - so, to refine it: Please help me define (and therefore, research/learn how to use) the Pythonic concept for writing a script that can take one input variable, ...
2
votes
1answer
1k views

How do I select by location based on selected features with Python?

Is there a way with Python to do Select by Location with the Use selected feature option? I'm trying to automate a process and am running into barriers. I need to be able to select the 2 lines ...
8
votes
1answer
169 views

Where to find and share Python geoprocessing scripts? [duplicate]

Where are folks storing and sharing their Python geoprocessing scripts? For example, I know that GitHub has some shared scripts. ESRI is phasing-out ArcScripts, which is still really handy, and ...
-1
votes
1answer
63 views

Is it possible to import/run AML script into GRASS?

I have an AML script that has instructions to import tmp files of (grid, network, basin...) is there any way to run the script in GRASS? I tried to converted to Python but I couldn't do it for the ...
3
votes
1answer
218 views

'Pausing' a Python script tool to allow the user to provide input before continuing

I am using ArcGIS. I have written a Python script that creates various surfaces including NDVI. After the script creates those surfaces, I would like the script to stop running while the user ...
0
votes
0answers
72 views

Copy Raster Catalog from .mdb to .gdb, but only within a certain extent with arcpy?

I am stumped again, this website has really helped me before so here is another shot. I am trying to copy a raster catalog from a personal geodatabase to a newly created file geodatabase but only ...
2
votes
1answer
478 views

Incremental “auto save” in ArcMap edit session

Is there any way to add automatic incremental saving to ArcMap 10.1 editing sessions? I found this script for 9.x but it doesn't seem to work with the newer versions. I'm looking for a script or add ...
0
votes
1answer
142 views

how to loop grass command in python and put variable in output file

anyone, first day Grass programming with python scripting; first prob; simple I want to reclass the same raster several times; and save the file with the value loop variable at the end ... can not ...
5
votes
4answers
709 views

How to check via Arcpy if ArcMap is currently in an edit session or not?

I've created a Python add-in button that helps speed up my coworkers workflow by copying one feature class attribute to another. It uses the arcpy.UpdateCursor function to update a row in the target ...
1
vote
0answers
149 views

Change ArcGIS License using Script [duplicate]

I am using ArcGIS Desktop 10 and we have three different servers for accessing concurrent use licenses of ArcView, ArcEditor and ArcInfo. So, whenever I need to switch to other product, I have close ...
2
votes
1answer
193 views

Generate unique ID upon creating a feature?

Looking for a way to generate a unique Global ID within a feature set when a new feature is created. For example, every time a sewer manhole is added, we need to generate a new unique Global ID that ...
0
votes
1answer
156 views

Running a script with QgsFeature from within the console

I am trying to run a script from the QGis Python console (similar to: http://spatialgalaxy.net/2012/01/27/qgis-running-scripts-in-the-python-console/) The line feat=QgsFeature() operates fine from ...
0
votes
1answer
86 views

How to add layer in Arcscene using script tool

import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "*")[0] addLayer = arcpy.mapping.Layer(r"F:\project\Final\Ground floor\steps.lyr") ...
12
votes
2answers
350 views

Measuring Script Writing Competency

I've been asked by my manager to come up with some sort of competency measure for an employees understanding of scripting/programming. Because I am a self taught programmer, I really don't have a ...
1
vote
1answer
198 views

Does Identify tool of ArcGIS for Desktop have Python script behind it?

Can anyone let me know the Python script for "Identify" tool in arcmap10. I need to create a customized script tool for that and add in a toolbar.. Pls help...
2
votes
0answers
46 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 ...
1
vote
1answer
82 views

Adding parameters to a category in a script tool

There is plenty of documentation on how to add parameters to a category in a python toolbox, (See the bottom of ...
3
votes
1answer
432 views

What causes ModelBuilder error occurred in script on this page MdDlgContent.htm?

I've been creating a model in Arc 10.0 for a few days now without problems. Then I added the Calculate Field Tool. I selected Make Variable --> From Parameter --> Expression. When I check off "Model ...
3
votes
2answers
581 views

ArcGIS script tool: Can you have an input parameter set to optional and have the tool work when an input is not provided?

I'm building a script tool that processes shapefiles ( GPS data collected on weekly basis). The tool is set up to take an input for each shapefile ( in this case Sewer, Storm, Sign). On some days, ...
2
votes
1answer
143 views

Select and zoom python script

I am attempting to make a simple select and zoom python script for my address points. Currently the script will complete successfully but will not select or zoom to the entered point. I am using two ...
1
vote
1answer
345 views

Calculating mean upslope aspect

I am trying to write a python script to calculate the mean aspect upslope from each cell in a DEM. I have the general workflow down, but my final output is restricted to angles between 0 and 90 ...
3
votes
5answers
3k views

Renaming a field using arcpy

What I need to do: rename a field name of a table/feature class copy all values to the new field So far I have done following code as artwork21 suggests: EDIT: import sys import traceback import ...
2
votes
1answer
175 views

Difficulty converting standalone script to ArcGIS tool

As my title says, I am currently trying to make my (working) standalone script into an ArcGIS tool so I'm not the only person in my office that can use it. It essentially selects all the data within ...
4
votes
2answers
360 views

ArcGIS Conflation Tool Recommendation or Custom Script for Comparing Points

Can anyone recommend conflation tools for ArcGIS Desktop (10 or 10.1, paid or free) or a scripting outline / procedure (or just a script) to have a technician efficiently process the following rules? ...
3
votes
1answer
158 views

Beginning Arcpy: Asking for a quick review of my script

I cobbled this code together from ESRI documentation and stackexchange answers. I tried to use SearchCursor(points, fields=fieldname) but I get this error: TypeError: SearchCursor() got an ...
0
votes
1answer
462 views

Invalid topology error when running script

I am trying to run a python script and I get an invalid topology rule when I get to the feature to line tool. I am using arc 10.1 but I think the script was written in 10.0. I know it was built in ...
4
votes
2answers
222 views

Running python 2.6 and 2.7 in ArcGIS 10.0

I figure that there must be a way for me to run python 2.6 and 2.7 on the same computer. I've got a program that requires 2.7, but ArcGIS requires 2.6. I'd like to be able to run both programs at ...
5
votes
2answers
1k views

How to use QGIS Zonal Stats Plugin from Python Console?

I am using the Zonal Stats plugin in QGIS to extract raster statistics from overlaying polygons (I have shapefiles of species distribution and I want to extract environmental data from within each ...
1
vote
1answer
653 views

How to use OL Script protocol callback

I have a layer with a BBOX strategy with a script protocol to get the data from our server. I'd like make use of the callback function ...
1
vote
1answer
98 views

arcpy.sa.CostDistance from Python gives error about number of args but executes fine through Toolbox

I am attemping to call arcpy.sa.CostDistance to calculate the cost distance to a source point as well as generate the optional Cost Back link raster: arcpy.sa.CostDistance("input", cost, "costDist", ...
1
vote
1answer
180 views

ArcPad get vbs script location

Within arcpad (edit form) I want to get the current location of the vbs script running. This simple vbs script outside of arcpad works fine. wscript.echo " " + Wscript.ScriptFullName However, when ...
5
votes
1answer
271 views

Error using con in Map Algebra in Python script

I am experiencing a painful problem in the middle of a Python script I am writing. When I get to a Map Algebra function, I have tried two different options and both return a different error. At first ...
3
votes
2answers
171 views

ArcGIS Calling Wrong fme.exe When Python Script Converted To An ArcGIS Script Tool

I'm using this this bit of code to execute a FME Workbench file through a Python script ... import os os.system("fme.exe P:\\Mapping\\Scripts\\FME\\Easements_ROW_Extract_From_CAD.fmw") However, ...
0
votes
2answers
194 views

How to create a route and add that route as layer to map using ArcPy?

I wrote a little script for ArcGis, and when I make it run by GUI it happens that it seems to create routes but the routes do not appear in the TOC. Consequently, when the script tries to execute ...
3
votes
1answer
184 views

How to run OSgo4W shell script on Windows?

I have a lot of DEMs that I want to use to create hillshades, slopes and color relief from and would like to automate the processes using a shell script within OSgeo4W shell. Here is the code I used ...
9
votes
1answer
2k views

How to export only certain columns to a CSV file in ArcGIS?

I've written a python script using arcpy which outputs a polygon feature class into a File Geodatabase. I have added a function to export the attributes to a separate CSV file. I am using the code ...
4
votes
3answers
293 views

ogrinfo bash script failure

I need to recursively document a bunch of Shapefiles using orginfo in many directories. For example, $ tree -P *.shp . ├── acfish2s │   └── acfish2.shp ├── airports │   ├── airport_runways.shp │   ...
4
votes
5answers
582 views

Python loop Polygon to raster not working

I want to convert a large number of different shp polygons to raster in ArcGIS 10.1, using an existing field column "class" for the new raster classes. I am not very fluent in python but I thought ...