The act of setting up computing instructions, usually stored in a file and interpreted at run time.
4
votes
1answer
42 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
68 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
1answer
51 views
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 ...
0
votes
0answers
36 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: ...
1
vote
0answers
50 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 ...
2
votes
2answers
63 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
1answer
46 views
Linux Client for OpenGTS server
I've installed an OpenGTS server and successfully linked it with the GPS2OpenGTS_Pro application for android.
The buses I'm tracking offer 3G with a wireless AP, however whenever the bus stops, the ...
0
votes
1answer
63 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 ...
4
votes
2answers
92 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 if the GUI.
I want to be able to run R scripts in QGIS, ...
2
votes
0answers
43 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 ...
4
votes
0answers
43 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
52 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 ...
2
votes
1answer
33 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 ...
1
vote
1answer
40 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 ...
0
votes
1answer
36 views
Change the extention of a map to show a query result
Does anyone know how to change the extent on the map in function of a query? in legende I have no problem using the function showResults (featureSet) {...
but, can not get any display in AMD. Here ...
2
votes
0answers
117 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 ...
5
votes
3answers
165 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 ...
0
votes
1answer
38 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
128 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 ...
2
votes
0answers
26 views
Script tool does not create output variable
I have the following problem. I have created a python script, which output should be a list of values (res[i]=*something*). Now I would like to create a script in my toolbox so i could use it from ...
2
votes
0answers
51 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 ...
1
vote
2answers
148 views
How to programmatically convert arbitrary XML data to shapefile?
EDIT: Based on the answers below I decided to do some programming. I'll be using GEOtools for this, a java lib: http://www.geotools.org/
I have the following XML:
<shapes ...
5
votes
2answers
131 views
Field calculator script to work out first 5 dominant area fields?
I have 5 fields of different landcover types with areas of each and found below:
> PRC_Water| PRC_Bare| PRC_Urban| PRC_LVeg| PRC_LVeg|
> 5 20 40 20 15
I have ...
0
votes
1answer
72 views
How to script map production in GRASS?
I'm trying to automate my production of maps with GRASS. What I want to do can be described in fairly generic terms: I have two layers (one vector, one raster), which will be identical in every map. I ...
3
votes
2answers
108 views
Using ArcScripts
I use ArcGIS 10
I want to use an arcscript to compute an index of ruggedness for each cell of my map. For this purpose, I found, Evan's TRI.aml script here:
...
0
votes
1answer
126 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
74 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
117 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
79 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
136 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
88 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
83 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
24 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
61 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
83 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
30 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
47 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
90 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, ...
1
vote
1answer
452 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
155 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
57 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
160 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
48 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
292 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
89 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 ...
4
votes
4answers
385 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
92 views
Change ArcGIS License using Script
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
167 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
105 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
53 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")
...