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
21 views

Iso Cluster tool in script failing to open clip raster

I have been coding in Python for only a few months, so maybe I'm just overlooking a minor detail as a newbie. I have written the script below for a class project. It is supposed to clip two rasters, ...
1
vote
2answers
42 views

Error 000732 - input raster does not exist when implementing script tool arcpy

I am trying to implement a script tool in ArcGIS 10 that completes a few equations with raster datasets. I seem to be getting the same error no matter what I try: <type ...
0
votes
1answer
54 views

ArcPy script error - NoneType object has no attribute X

I'm familiarising myself with using scripting in ArcMap 10.2 and as part of this I'm using the following to extract vertices from some polygons. ... ... import arcpy ... from arcpy import env ... ...
-1
votes
3answers
38 views

ArcGIS arcpy code fails in Toolbox mode

This code executes correctly in Python window but fails with ERROR 000732: Input Table: Dataset JHJ does not exist or is not supported # Import ArcPy and other required modules import arcpy ...
0
votes
0answers
27 views

Does somebody has a Python script for a Multiple Flow Algorithm?

I´m looking for for a python script for a multiple flow algorithm assigning flow to all lower cells from one central cell. This algorithm is part of the r.terraflow and would need it to start at a ...
1
vote
1answer
64 views

Executing tool comes back with an error arcpy.JoinField_management

I have this script snippet, written by Aaron. import arcpy import os #set workspace arcpy.env.workspace = "C:\\Users\\Documents\\Wetland\\New_Folder" #in the folder "New_Folder" is a geodatabase ...
0
votes
0answers
60 views

I cannot use Gdal Python but Gdal binary, how to fix?

**UPDATE: I can use GDAL with Python now by copy file from Gdal 1.11 compiled folder to Python package folder. But the problem with GDAL binary and GDAL library that they cannot read the HDF5 file. ...
0
votes
1answer
34 views

Error using 'Join attributes by location' via Python

Trying to run a simple script using qgis:joinbylocation but getting either errors or it's not processing correctly. I don't want to take a summary of the attributes, just the attributes of the first ...
2
votes
1answer
63 views

forLoop & joinField & different names

I have a folder with an output (shapefiles) from an iteration. On this output, I want to perform a join between two attributetables. So far so good. Here comes the tricky part. There are different ...
0
votes
1answer
42 views

Definition Query then Zoom to Layer Automation?

I'm trying to create something in here. I want to have an automated process of doing a DEFINITION QUERY then ZOOM TO LAYER with one step. the concept is like that, a dialog comes up with one form ...
1
vote
2answers
193 views

ArcPy setup and operation

I'm looking getting familiar with using ArcPy scripting within ArcMap to automate some common requirements (buffering, etc), however have some queries on how this is all set up. I'm running Arc 10.2 ...
0
votes
1answer
96 views

Using Union on multiple shapefiles to output single result

Using QGIS 2.2 and Python, I would like to use the Union algorithm on multiple shapefiles (contained in a folder TEST) which would then produce single shapefile containing all the data. Currently ...
0
votes
1answer
59 views

Possible to run “Merge shapefiles to one” algorithm from Python script?

Developing a python script in QGIS 2.2, I can run algorithms from the Processing plugin fine such as those from QGIS geoalgorithms and SAGA. Can you do the same for the algorithm "Merge shapefiles to ...
0
votes
0answers
59 views

How to keep all the unique columns of the shapefiles after merge?

Writing a script where the user is asked to select a directory which contains Folder_1 and Folder_2, both containing shapefiles and run various algorithms. The basic logical process of the script is: ...
-2
votes
1answer
192 views

Creating a python script to import an excel spreadsheet, create shapefile and do some analysis [closed]

I am trying to write a script that does the following. Imports an xls file containing x, y, and other columns with data. I want to make this into a point shape file. I want to take that point ...
0
votes
1answer
71 views

QGIS Scripting problem updating contrast enhancements for raster layers using bandStatistics

Found this function to update statistics for a raster layer : rlayer.setContrastEnhancement(QgsContrastEnhancement.StretchToMinimumMaximum, ...
3
votes
1answer
36 views

Removing “(optional)” from parameter description in Python script tool dialog?

I am using ArcGIS 10.2 and create a script tool in toolbox for attribute search on a layer, all the searching criteria is not compulsory, and user can combine multiple search criteria. But in the ...
0
votes
1answer
53 views

Copy feature class to feature class in loop and a list of fields in modelbuilder

I have a several file geodatabase with seven features in it (polygon). I want to copy them to a new feature in a other empty file geodatabase (instead of deleting the fields...had same problems with ...
0
votes
0answers
28 views

Script to stack multiple landsat bands in different folders

I wanted to find out if there is a possible script I could use to stack landsat bands into a single image, and then apply that stack command to multiple folders (I have about 100 landsat scenes that ...
3
votes
2answers
117 views

How to select all files in a directory for merging in Processing?

I'm writing a generic script which involves writing shapefiles to a directory which are then merged together. After writing the files out to the Output folder, I'm trying to get the ...
-1
votes
2answers
45 views

arcpy open up a script tool window once user save edits

On our map, after user draw a polyline on map and click "Save Edits", we need user to input the attributes related to the polyline drawn. In case user forget or skip this step (input attribute ...
1
vote
1answer
28 views

python script in toolbox add a button on the window

I am getting stuck when I want to create a new python script in toolbox. The function I want to develop is to let user to input the user ID, then retrieve from the database the other values to allow ...
0
votes
1answer
29 views

Set the parameter values retreved from database in Arcgis script tool in toolbox using python [closed]

I am now thinking a function to allow user to modify his information stored in the database. To do this, I developed 2 script tools in ArcGIS(10.2), One is the ask user to input his ID, the other one ...
0
votes
1answer
56 views

How to open QGIS using VBA?

Using VBA, I want to open QGIS (the actual GUI) and execute a simple script through the Python console or the editor.
0
votes
0answers
49 views

Script to turn layers on/off in Data Driven Pages?

I'm working with Data Driven Pages to create a map series of communities (points). I'm using Model Builder to create a line poly feature for each community. The line poly shows the time away from each ...
0
votes
1answer
32 views

QGIS Python - Executing functions for multiple directories

I would like the user to select 2 directories, each directory having their own defined algorithms. For example: First_Directory will add a column to all shapefiles in the chosen directory; ...
0
votes
1answer
32 views

How to resolve 000210 problem, when I use Scratch Workspace

I have some problem. Now I'm trying to make Python script to resolve some problem. I need too place all out features in Scratch Workspace (Later this script will be used in web GIS and intermediate ...
0
votes
1answer
48 views

Iterative interpolation

I have an excel file with about data from 600 locations, each location having data for 1200 months(12 months* 100 years). I need to interpolate all point locations into rasters for each month of each ...
2
votes
1answer
95 views

QGIS Python Scripting - Syntax definition

After playing around with the Model Builder and looking at the python scripts of what I make, I noticed some syntax which I can't find the definition anywhere. Here is a snippet of the python script ...
0
votes
1answer
75 views

How to create a grid after merging shapefiles?

Follow up question to QGIS Model Builder Script - Possible to merge layers in a folder? I think I'm missing something very obvious here but can't seem to find it. After merging shapfiles in a folder, ...
0
votes
1answer
69 views

QGIS Model Builder Script - Possible to merge layers in a folder?

I would like the user to select a folder via the interface in which all the vector shapefiles inside that folder would be merged. I have been using the Model Builder and looking at example scripts ...
4
votes
2answers
78 views

ArcGIS Toolbox, parameters for python script not as positional arguments

I have an ArcGIS Toolbox with a bunch of parameters. A python script is used to perform some raster operations, based on this parameters. I am using Python argparse in the script to get the ...
1
vote
1answer
62 views

Error with data frame in python script

I'm running a python script from arccatalog and it works, however, I am trying to add layers to an mxd and need to declare the data frame. I keep getting this error message. type ...
0
votes
2answers
38 views

excel column does not appear when doing join after doing modification to the column

Using ArcGIS 10.1 I am trying to add " /1 " my column provided Shp File how it appears in the county supplied excel spreadsheet under "parcel #" 43002/1 18524/1 1666/1 4270/1 Currently, the county ...
0
votes
1answer
32 views

Calculate text field based on codeblock query of numeric field

I am trying to populate a field with a L/R bank designation based on a route measure (as part of a larger script), but I am struggling. I have a shapefile created (tir_pts_lyr), I have a blank column ...
0
votes
0answers
124 views

Help with scripts for processing raster files with the raster calculator in QGIS

I am trying to process some raster files using python scripts in Qgis 2.20, and I have been having trouble finding any documentation on using raster calculator in scripts being run in the processing ...
1
vote
1answer
48 views

Why does Animal Movement toolbox give SyntaxError: invalid syntax?

I found a complete toolbox (Animal Movement tbx, by Regan Sarwas) for my tasks and I tried it. I had a systematic problem with the codes for all tools (line 1), for exemple: Executing: ...
0
votes
1answer
35 views

How to troubleshoot and fix TypeLoadExceptions in ArcMap AddIn when executing a compiled c# script?

I am attempting to compile a c# script (class) on the fly and run it from an Arcmap AddIn (the script contains no ArcObjects). My unit test, in Visual Studio 2013, works just correctly and I am able ...
1
vote
1answer
73 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
65 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
52 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 ...
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
95 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
59 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
0answers
16 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
40 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() ...
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
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 ...
0
votes
0answers
42 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 ...