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

learn more… | top users | synonyms (1)

6
votes
1answer
2k views

How to write standalone Python scripts using QGIS?

I've been learning how to use the Python Console in QGIS using references from qgisworkshop.org. I'm familiar with writing standalone scripts in ArcGIS and want to learn how to do the same with QGIS. ...
6
votes
2answers
2k views

How to calculate XY coordinates in Decimal Degrees from projected dataset in model or script?

Is it possible to calculate points XY coordinates in Decimal Degrees in model or script when a feature class is in projected coordinate system? It's easy when a FC is in geographic coordinate system: ...
4
votes
2answers
244 views

ToolValidator not doing anything

I have created a simple script tool which has a single parameter of type "String". I have written the tool validation to disable the input field (simply trying to learn tool validation). The ...
3
votes
1answer
249 views

How do I stop GP script from adding temporary data to Table of Contents?

I have a script that does a series of calculations, producing temporary data along the way. However, at each step of the script, data is added to the TOC and then removed when I call the ...
2
votes
0answers
567 views

Dynamic Contour generation and project on google maps

Is it possible to generate contour map layer at runtime and overlap or project on google maps. I am using google map api v3 and want to generate contour map layer using data from sql server and ...
1
vote
0answers
428 views

Variable stored as NoneType in Python with updateCursor

SOLVED: although the field was not nullable (no null values), a glitch created one in the heading field, so the variable was stored as a null value and thus the NoneType. I am using updateCursor to ...
3
votes
1answer
364 views

Python conditional on current and previous row

I need to calculate a new field with a python conditional where some values only occur if a sequence in a separate attribute field (X) occurs. For instance my data set looks like this. Y is the ...
2
votes
3answers
3k views

Python script: Access data from databases [closed]

I need to access data that is inside an oracle database using a python script. Its a Unix server running oracle 10g. I dont have much access to the database server. It works fine on model builder ...
2
votes
2answers
421 views

Looking for python/VB script to insert a new uniqe field

Is there any phyton/VB script which will add a field to shapefile which will be corresponding to first three characters from the shapefile name ? I am working in modelbuilder and arcgis 10. Thanks ...
1
vote
1answer
279 views

Search By Location

Using Arcmap 9.3 I was curious if anybody has a script or vba tool that will select items from a layer that are not within a selected polygon or not touching the selected polygon. Thanks for your ...
4
votes
2answers
1k views

Check if shapefiles exists in folder

In ArcGIS modelbuilder I want to check if a shapefiles exists, if not I want to create the shapefile in that folder. I guess the calculate value tool within ArcGIS modelbuilder can be used, but I need ...
2
votes
2answers
429 views

Configure QGIS to show only the toolbars wanted.

I friend of mine who are using QGIS in their organization for non GIS-experienced people asked me a question the other day that I didn't knew the answer to. He would like to configure QGIS to only ...
4
votes
5answers
474 views

Can a new point automatically be populated with data from the containing polygon

I need some help to create a script. Imagine that I'm using 3 shapes: 1 point and 2 polygons. When I create a new point I want it to assume some attributes of the polygons in which that point is ...
1
vote
1answer
91 views

Other than the methods stated on the Desktop 10 Sharing Tools section, are there any other ways to distribute custom toolscripts?

Essentially I want to be able to distribute a custom script and it seems that I cannot create a .tbx file, so I looked into the other methods, but they are all only for Python modules it seems. What I ...
1
vote
2answers
307 views

Script for creating a tile-pyramid from a wms service

Given a WMS service, is there a ready-made script that, for a given extent, creates a tile-pyramid that is compliant with: http://leaflet.cloudmade.com/reference.html#tilelayer That is urls on the ...
1
vote
0answers
555 views

Python script for running ArcGIS10 Area Solar Radiation tool

I am trying to run the Area Solar Radiation tool using a Python script, because I want to run it on several DEMs at once. I am using a server with Windows 7, ArcGIS 10 and PyScripter. I am a beginner ...
1
vote
0answers
254 views

Does anyone know a script to make annotation & point data remain constant regardless of scale

I have a series of maps to create for a project (30+ maps). The maps will be at varying scales (roughly between 1:1000 and 1:6000). I have a geodatabase containing various annotation and point ...
4
votes
2answers
240 views

How to select a subset of separate bands in GRASS GIS?

As you know landsat data has separate files for different bands. Creating a subset is a wise option to work on region of our interest. Therefore, I used this method to subset my image - d.zoom || ...
7
votes
2answers
1k views

Automatic batch update a file geodatabase from shapefiles

Every week I need to update the same shapefiles that are used to produce up to date maps. The files are downloaded from 3 different web-servers. The thing I want to do is to have a script that can ...
6
votes
3answers
2k views

How to send someone a file of a custom python script with all parameters for the popup interface already defined?

I have a python script in ArcGIS 10 that when clicked, has a popup for a user to choose parameters. I would like to send this file to someone else. While I could send them the python code and have ...
3
votes
2answers
237 views

Finding script location… dynamically

Should be a simple question... but those can be the hardest. I have created a script that uses ESRI's arcpy site package and it functions properly in a stand-alone environment. I am now trying to ...
4
votes
2answers
316 views

How to import GDAL in Jython?

I'm trying to use jython with GDAL on Windows. Python and GDAL are installed through MS4W and work perfectly together. Jython is installed manually, but I can not import GDAL. I tried to update ...
1
vote
0answers
227 views

Extract by mask run time error in VBA

I have the following script language code shown below within a main code just to run the tool of spatial analyst "Extract by mask". Unfortunately, when I run it I get a Run Time Error. I checked file ...
0
votes
1answer
108 views

d.legend script is not working

I'm using the d.legend script in grass but it is not working. I can only show/hide the legend using the 'add legend' option in the Map Display window in GRASS. I need to make d.legend script to work ...
4
votes
1answer
835 views

FIELD CALCULATOR VB scripting

In my attribute tables field. I am trying to get rid of the "&" in between names i.e. "John Adams & wife" and want it to say "John Adams and Wife" in all the attributes with "&". What is ...
2
votes
2answers
370 views

how to calculate a field from a shp currently sected in a arcmap session using a Python script in ArcMap 10?

Hi I nedd to create a script in Python for use in ArcMap 10. This script must be able to calculate a field from the shp currently selected in ArcMap. Any ideas?, I'm new to Python so any code example ...
1
vote
1answer
379 views

Issues Merging in Model Builder after Running Script

I have multiple inputs running through various processes throughout my model. At the end of these processes they are all merged together and output into one final feature class. This was working fine ...
3
votes
1answer
1k views

How do you make a SQL join query for a NULL in a search cursor in ArcPy?

I am trying to learn how to do some error catching/avoiding in ArcPy. Here is a simplified version of what I would like to do. I would like to take some points, and then check to see if there is a ...
9
votes
3answers
3k views

Setting parameters in Script Tool using Python

I hate to bug you all with the same problem over and over again but I run into a new problem everytime I make a slight change to the code. All I did to the code below was to replace field names to ...
2
votes
1answer
1k views

Using python lookup table to compare records with existing geodatabases

I am trying to use python to look through an access table containing facilities that need to have geodatabases with geodatabases that already exist in order to generate a list of facility geodatabases ...
2
votes
3answers
743 views

Field calculator script not working

I am trying to do the following in the field calculator in ArcGIS 10 if [IncdStDir] = " " then [IncdStNo] &" " & [IncdStName] &" " & [IncdStSfx] else [IncdStNo] &" " & ...
4
votes
3answers
4k views

ArcGIS 10/arcpy: Help needed with syntax for CalculateField_management in Python script

I need to use CalculateField_management in a Python script, and the calc expression needs to concatenate a runtime variable, a string, and a field (string) value. I have searched all over for ...
5
votes
3answers
2k views

Python: Combine multiple Shapefiles

i have got a lot of Point-Shapefiles (r20010101.shp, r20010202.shp, r20020101.shp...). Each of them has the same amount of points at exactly the same location. In a column that is named after the Date ...
4
votes
2answers
438 views

Monthly Average Solar Maps (R.Sun) in Grass

I'm trying to create monthly average maps as described in R.Sun in Grass. I have my DSM. In reading the page on OSGEO it mentions that it is possible without showing how. Ideas? I assume I will need ...
6
votes
1answer
2k views

ArcMap Field Calculator syntax (again)

I'm trying to string together a field calculator script that will populate all the records of a field at once based upon values in a number of fields. I can't even get the first part of the command ...
2
votes
1answer
381 views

Scripting in GRASS

Can anyone suggest me web-links to learn scripting in GRASS GIS (its utilities, examples etc.) other than those available in GRASS official Wiki/Sites?
5
votes
1answer
687 views

arcpy.mapping.ListLayoutElements() takes longer in a tool than in ArcMap

Has anyone else noticed that accessing elements from arcpy.mapping.ListLayoutElements() through a tool script takes longer than within ArcMap? Whether using a specific name, wildcard or nothing, the ...
0
votes
1answer
326 views

Calculating length with Python and the PYTHON_9.3

(Please critic wholly if possible) If I have polyline data in NAD83 and I want to calculate geometry using the PYTHON_9.3 parameter from the arcgisscripting.create(9.3), I am getting mixed results. If ...
3
votes
1answer
655 views

How to Solve the error - “Python Plugin is Broken”?

I tried following the steps to build a python plugin for QGIS. (step 3 is where I am stuck at) 1) I used the Plugin Builder plugin to build the initial set of files. I call my plugin ...
1
vote
3answers
4k views

os.sep in python scripting

what is os.sep and when should i use os.sep while scripting for arcgis ? for example in below code i don't understand why should i use os.sep . import arcpy from arcpy import env import os # Set ...
1
vote
3answers
678 views

Automating capture of Extent from multiple mxds with multiple dataframes

I want to create a single shape file from multiple mxd's that have multiple frame sets with different extents in them. I have found/started a script to do this (attached) but can't figure out how to ...
5
votes
2answers
2k views

(New at Python Scripting) Creating a Loop so i can replace text in page layout in multiple mxds instead of one mxd at a time

I found some code on a website that will perform a search and replace on page layout text elements. Currently you can only do it one MXD at a time. I was hoping to change the code so I can do a search ...
4
votes
1answer
276 views

ArcPy or FME for adding history to an object?

I have a very specific problem and I'm looking for a solution for it. I need to add some sort of history to an object. The history will be stored like this: begin_date end_date previous_id Suppose ...
8
votes
3answers
2k views

How do I use variables from one Python script in other Python scripts?

I want to set up a single python file containing variables that have the locations of all my data sources. This would then be used by all my other scripts, then as a data source changes, I only have ...
4
votes
3answers
3k views

Batch shapefile merge, with adding and calculating field

I have over 60 shapefiles, all in their own folders. I'm looking to add a field titled "Name" and then populate it with the name of the shapefile. I want to be able to do this so that I can then ...
1
vote
1answer
212 views

The resulting maps from a r.mapcalc script is not computed properly

This post is a continuation of my other post Why is my controlling shell script not working?. I created another post because this contains a separate issue that I encountered with the same scripts of ...
1
vote
1answer
235 views

Why is my controlling shell script not working?

I updated my post after I resolved the previous errors, but additional errors were produced. I want to create a controlling shell script that contains water.mapcalc within it. The problem is, I do ...
1
vote
1answer
313 views

Shell script commands

I have this shell script: #!/bin/sh r.mapcalc water = 120 d.rast water i=1 while [ $i != 100 ] do n=1 while [ $n != 10 ] do r.mapcalc < water.mapcalc d.rast ...
3
votes
1answer
348 views

How to get the Flow or directional raster map using GRASS?

Aside from using r.fill.dir in GRASS, is this the script to produce the Flow or directional raster map? Is this the output for the script ...
4
votes
1answer
315 views

Programmatic Configuration of ArcGIS Server data and layers?

Hey all, I'm trying to figure out how people in the ArcGIS Server world script configurations. In the GeoServer world we have the REST Config API, which lets you configure connections to a database ...