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

learn more… | top users | synonyms (1)

1
vote
1answer
70 views

Arcpy Script tool

I'm creating a script tool and using the SelectLayerBy Attribute function (below), arcpy.SelectLayerByAttribute_management("cities_lyr", "NEW_SELECTION", '"CRIME_INDX" <= 0.02') However, I keep ...
2
votes
1answer
63 views

Conditional SQL Query

I've been running a code that searches a desired field in a feature class and performs an specified SQL query based on whether the field is string or double. The variables are just temporary fillers ...
0
votes
0answers
51 views

Failure to display R script result plots in QGIS

I'm trying to run R scripts (3.0.2) from QGIS (2.0.1) on Windows 7 x64. There seems to be a known bug whereby the output results do not display in the QGIS GUI, but rather just an html path ending in ...
1
vote
1answer
69 views

SQL within Python Script to get only part of the expression by GetParameterAsText

I was wondering if anybody could help me. Im trying to create a tool within ArcMap using a python script. Within the script i've been trying figure out how to change it so that I only need to get ...
6
votes
2answers
897 views

Resources on using R in QGIS for R users?

This is a very basic question, but I'm having a heck of a time figuring it out because so much of the QGIS documentation is oriented toward use of the GUI. I want to be able to run R scripts in QGIS, ...
2
votes
1answer
26 views

Setting the output parameter in a toolbox to be a PDF

I need to allow a user to input a path and name where they would like to save their new map book PDF on their computer/drive. I have created a script where the user can input their mxd with data ...
0
votes
0answers
85 views

Using ArcPy, is there a way to change the color of a symbol in a UniqueValuesSymbology object?

I have an template mxd I reference with several pre-defined layers. The only variable I need to modify is the color of certain symbols in the layer. I have tried to modify and dig around the Symbology ...
0
votes
1answer
58 views

Use a variable to calculate a field with arcpy as a script in a toolbox?

stringvariable = "banana" arcpy.CalculateField_management("c:\point.shp", "SUBDIRECT", "stringvariable", "PYTHON") I get an error saying stringvariable is not defined what's the deal? I check ...
0
votes
2answers
61 views

How to get Python script tool to take list of variables?

I am looking at making a Python script script tool that requires the user to input a series of attributes into a list, which is then used to build a query, to select multiple polygons (i.e. "abc, ...
0
votes
0answers
15 views

std::bad alloc when writing simple script in QGIS

I'm running QGIS 1.8 on Scientific Linux and I'm attempting to write a script (obviously this will be built upon to do something useful) which simply writes to a file. ##raster=raster value=5 ...
0
votes
0answers
39 views

Add feature to csv via PyQGIS

I'm using PyQgis 2.0.1. Is it possible to add feature to csv file? I've tried to do this as it's shown in CoockBook: if caps & QgsVectorDataProvider.AddFeatures: feat = QgsFeature() ...
3
votes
1answer
137 views

Looking for help for automatically making a QGIS map

Im looking at making a standalone script, that on execution will run the QGis MapComposer using a previously generated template and output a PDF/PNG of the map. This process of making a map will be ...
0
votes
0answers
22 views

expanding atributte window during typing in ArcPad

I want to customize my ArcPad and I need add one ability, which I cannot change: To expand (widen) atributte window during writting in ArcPad. It means, when I'm typing an atributte, when running out ...
6
votes
4answers
944 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 ...
0
votes
0answers
41 views

Openlayers KML script loads slow

Hy, I made a map with multiple KML layers with large datasets (total 500.000 markers). It works fine but as expected it takes a very long time for the script to load al markers. Is there a way to ...
1
vote
0answers
52 views

Automate data entry into Access from ArcMap

I have an Access 2007-2010 database that I'm currently working on by manually searching for roads in a defined set of areas in ArcMap 10.1 and then filling in the area's ID in an empty column in the ...
3
votes
4answers
898 views

Append to text file using ArcGIS and Python

I have wrote a small routine using Python for ArcGIS (9.3) that will get the count of 2 data layers, calc a percentage, and then write the text back to a text file (CSV) to create a sort of "report" ...
1
vote
1answer
73 views

Area Solar Radiation tool - many rasters with different lats and zs

My problem is as follows: I want to count direct radiation for all Europe. As the Area Solar Radiation (ASR) tool allows to work only on small landscapes, I cut my raster-Europe into fragments with ...
1
vote
0answers
48 views

Moving a Google Map Marker on a Mac

I have exact lat & long coordinates that I will enter and hit return in Google maps. When I do this it displays this point with a green marker on the map but I can not move this marker. I want to ...
1
vote
0answers
78 views

Python script does not work for a LGA with space [closed]

Thanks! I got my script working now with replace gp.AddMessage() instead of print when running the script in ArcMap and replace the quote with blank as well since Python would include the quotation ...
1
vote
0answers
292 views

ArcGis Server Java script API error code 500 while using proxy.ashx on one particular server

I am looking for help with using proxy.ashx in Javascript API on one particular server at a client site. We have a GP service that the proxy is used to access (when request is more than 2048 ...
2
votes
0answers
107 views

How do I capture data from an OBD-II device?

So I happen to have a little bit of web experience, and have recently bought an OBD-II device. Basically, I'm trying to log certain metrics from the car, such as location and other diagnostics. I ...
5
votes
2answers
775 views

Describing a coordinate system in arcpy

I have a python script in ArcGIS 10.1 which takes in a few inputs from the user. One of the inputs is a coordinate system. I would like to test whether the coordinate system the user chose was ...
0
votes
1answer
168 views

How can I always run an algorithm with standard input shapefiles from mapcanvas in QGIS 2.0.1?

I created a model in the graphical modeler and I want to run that model always with two specific polygon shapefiles from my project, e.g. pst and astenot. Whenever I run my model, it asks me to set ...
2
votes
1answer
619 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 ...
3
votes
5answers
4k 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 ...
1
vote
1answer
160 views

Why am I getting “sequence size must match size of the row” error?

I'm trying to use an Insert Cursor to insert a point geometry into an existing point feature class. I'm finding the coordinate and appending them to a list called rowValues, ex: ...
1
vote
2answers
69 views

Custom BatchProject Script

Here's my problem. My GPS collects data in WGS1984 and I have decided to start working in UTM instead of state plane. Needless to say, I would edit shapefiles, not paying attention to what ...
0
votes
1answer
47 views

How to programatically create point and use it in Select by Location query?

I have a section grid for a US state. I also have a quarter/quarter section grid which splits the section grid into 16 equal squares. I have written a Python script that finds the XY coordinates of ...
4
votes
1answer
61 views

Programatically detect the format/version of an arc toolbox (e.g. 10.0,10.1 etc)

Is there a way to tell programatically (from the command line) what format a given ArcMap toolbox was saved in - 10.0, 10.1 and so on?
2
votes
1answer
168 views

How can I put the name of file in add field with python?

In my script, I have to create field in 15 layers. The name that I wold like to set in this new field is the same of the file's name. But all attempts that I did were worng. My script: ...
0
votes
0answers
63 views

Model Run from Python script

Ive broken a complex task down to a very simple excersise and still cant get it to work.... I need to set up a Python Scpript to Run a Model. model: "SelectTest" toolbox: ...
2
votes
2answers
256 views

Create python script to update field based on change in another field ArcGIS

I am trying to update a field "TPN" based on another field "PASS_NUM". In my script "TPN" is a newly added number field and thus blank, "PASS_NUM" is also a number field but it contains the wrong ...
1
vote
0answers
126 views

Why do I get different results running a script in PyWin and loading it to the Python shell in ArcGIS? [closed]

I've been trying to teach myself Python scripting for ArcGIS and have gotten frustrated on multiple occasions when I try to debug my script endlessly, only to later find out that it actually works ...
0
votes
1answer
221 views

ArcGIS ModelBuilder pass arcpy.SetParameterAsText as input to next tool

I am trying to build a model which uses two simple scripts, Script A and Script B. I want to use arcpy.SetParameterAsText to set an output in script A, which is then used as an input in script B. In ...
6
votes
2answers
252 views

How to replace a cyrillic symbol in an attribute table using python?

I've tried searching for an answer and I've already seen some similar themes here, but I still haven't been successful in replacing Cyrillic symbols in an attribute table, which is why I'm asking for ...
2
votes
0answers
44 views

Near Analysis takes much longer in ArcPy? [duplicate]

I have a feature class of about 12 points, a feature class of hundreds of roads, and need to find the nearest road to each point. So the obvious solution (Near tool) takes about 20 seconds, and the ...
3
votes
3answers
195 views

ArcGIS NEAR returns -1

We are running an ArcGIS 10.0 geoprocessing script written in Python that (as part of many steps above & below) runs the NEAR command. Both the input and output datasets (shapefiles & ...
2
votes
1answer
125 views

Embedded python script module import issue

I have two ArcGIS python scripts. One is a primary python script that calls a number of functions from a second python script. Everything works well, i.e. primary tool calls and uses functions from a ...
4
votes
0answers
53 views

Using QGIS plugins from Python [duplicate]

Is there a simple way to automate calls to QGIS plugins from a QGIS Python script? Either from console or a plugin? I am ideally looking for a way to specify input/output parameters and bypass GUI. ...
2
votes
1answer
192 views

How can I dynamically trim the informational border off of FAA sectional raster charts?

I'm trying to write a script that can automatically use GDAL to crop the informational border from the FAA's published sectional charts (GeoTIFF) found here: I know that I can use gdal_translate ...
12
votes
2answers
364 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 ...
2
votes
1answer
37 views

How to Set the width of a dropdown box?

I have created my own script in ArcGIS 10.1 and for one of my parameters I have a drop down list that the user has to select from. The longest entry in that list is only 6 characters, but the width ...
4
votes
2answers
2k views

How to install add-ons in GRASS?

How do I install the r.inund.fluv script in GRASS? https://svn.osgeo.org/grass/grass-addons/grass6/raster/r.inund.fluv/
1
vote
1answer
230 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 ...
2
votes
0answers
228 views

QGIS 2.0: Automating tasks, text files and shapefiles

Wondering if it's possible to automate some repetitive tasks in QGIS (2.0). This is my general workflow for importing some xyz type text files from another software package which export (not overly ...
0
votes
0answers
147 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 ...
2
votes
0answers
110 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?
0
votes
1answer
50 views

How to run only the newly added portion of a python script? [closed]

I was wondering if there is a way to run only the newly added portion of a python script? Usually I add a few lines of codes in the end of my script but I have to run the whole script to reach them ...
2
votes
2answers
150 views

How do I produce map images for Wikipedia?

I would like to make several map images (e.g. SVG or PNG) like those on wikipedia but in not popular projection. I am interested in scripting solution. Here I found this note: Generation Notes perl ...