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

learn more… | top users | synonyms (1)

2
votes
0answers
8 views

In QGIS 2.12 processing R scripts fails (plots remain blank) due to a wrong variable name - Is there a workaround?

I am trying to execute r scripts in 2.12. All of them fail. Plots remain blank. It seems that the variable "Layer[[Field]]" returns NULL: E.g: hist(Layer[[Field]],main=paste("Histogram ...
3
votes
1answer
86 views

Automating QGIS project composer printing?

I have a large project which consists of around 10x QGIS project files. Each project contains a print composer with an atlas set up to generate up to 10 maps. What is the easiest way to automate the ...
1
vote
1answer
49 views

QGIS Processing Script will not Validate

I am writing a script for QGIS that will identify the perimeter of only external facing walls. The script is probably a little long to post directly into this post, but it is accessible here. The ...
2
votes
1answer
77 views

Capturing Output Messages from GRASS when Running Python Scripts

Thanks to the excellent documentation here: https://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly#Python:_GRASS_GIS_7 I've figured out how to access GRASS modules in ...
3
votes
1answer
59 views

Running ArcView Avenue scripting files in ArcGIS?

Is there any way possible to run ArcView 3.3 Avenue Scripting files (.ave and .avx files) into the newer versions of ArcGIS 10.x? I am aware about the fact that ESRI has stopped supporting its ...
1
vote
1answer
29 views

Set a Vector input as a variable in QGIS Tool Script

In a QGIS script, how do you set a Vector input (via your tool's GUI) as a variable which can then be used in subsequent processing in your tool's script? I know how to set a map Layer as a variable, ...
2
votes
2answers
136 views

Dissolve line segments in QGIS if they touch and fall within the same class. (tools or script?)

I have line segments that have the following 3 attributes (Class, start_point, end_point). I would like to merge/dissolve line segments that fall within the same class if they intersect (touch). i.e. ...
2
votes
2answers
35 views

Moving Point Features (within a Polygon) to the Edge of those Polygon Features

I have a bit of a complex task, and was wondering if anybody has knowledge that could assist me. Data: Water utility data that is not connected through a geometric network. Data includes Parcel ...
1
vote
0answers
31 views

Implementing Python script in QGIS with input variables?

I would like to implement this script in QGIS: How to draw perpendicular lines in QGIS? and be able to choose input data from the layers in my map, and iterate over them. The script from the link ...
0
votes
1answer
42 views

Count Number of Unique 2-Field Combinations in QGIS Table

I have a table where properties are identified by their PID. A property can have multiple civic address points (e.g. larger buildings), but even when they do they still tend to border on only one ...
2
votes
1answer
86 views

Proper Use of QGIS tool: “Frequency analysis”

Trying to use the "Frequency analysis" tool in a script but getting errors. The Online documentations for this tool: processing.runalg('qgis:frequencyanalysis', input, fields, output) My Script: ...
5
votes
1answer
91 views

Create a temporary intermediate layer in a processing script

My algorithm needs a temporary layer in a QGIS processing script. I can use regular pyqgis api to create a temporary layer but want to know if there is a preferred and processing-specific way of doing ...
0
votes
0answers
28 views

Collector Python data editing

So just to start off with... I have a horrible rudimentary level of Python, so if someone plans on dropping code as an example, I will definitely have trouble following it. Apologizes abound... I do ...
0
votes
0answers
42 views

QGIS 2.8/.10/…crashes when I run, into PyQGis Console, a script within “exit command” of any GUI designed with the same pyQgis script code…Why?

I use QGis 2.8 or 2.10. I open Console PyQGis, so I can write Python specific code that I can design any GUI, as a simple Window Form. After I wrote this code I run this script created and it's ok ...
2
votes
1answer
52 views

How to write QGIS script to load Output file to Map Project with Desired Name?

Good news: the following line of code does produce the output as a shapefile with the name I want ("MyFile") and where I want it ("path"), path = "/Users/User1/Desktop/" ...
1
vote
1answer
48 views

Scripting with “self” in QGIS

What is "self" and how can I use it error-free in a Q script? Example: mc = self.iface.mapCanvas() But when I try to run this in the Console I get the following error: NameError: name 'self' is ...
1
vote
1answer
20 views

How to Make Scripted Tools Load Output File Automatically into QGIS Project?

When writing your own scripts, and using some of the pre-fab tools how do you make the output load automatically into your QGIS project? Example: In the Help Tab of the QGIS tool ...
1
vote
1answer
48 views

What are the 'output_layer' Parameter Options for QGIS tool “saveselectedfeatures”?

After a few comments and my own consideration I've completely Edited the content (and title) of this post. QUESTION What are valid "output_layer" parameter options when scripting with the ...
0
votes
1answer
26 views

How to Correctly fill in Parameters of QGIS Toolbox Tool “selectbyexpression”

I'm trying to use the tool "qgis:selectbyexpression" in one of my own scripts. But it doesn't work. My question is simple: "Why?" :) My hunch is with the 2nd parameter, the 'expression' (see "HOW ...
2
votes
1answer
44 views

Setting Instance of MULTIPLE LAYERS using “mapLayersByName” in QGIS Python Scripting?

I'm currently using "mapLayersByName" successfully to set one active layer at a time as follows... vl = QgsMapLayerRegistry.instance().mapLayersByName('My_Layer')[0] iface.setActiveLayer(vl) Can ...
0
votes
1answer
44 views

Copying Multiple Selections (by Attribute) to One Output Shapefile using QGIS Python scripting?

INTRODUCTION The code below makes a selection and then saves to an 'Output' file (shapefile?) each time through the "FINAL ITERATION LOOP". Each 'Output' file will contain all selected civic address ...
5
votes
1answer
82 views

Understanding background to Single Hash (#) Vs. Double (##) in QGIS Python Scripting?

First of all I understand the double hash (##) is used to define the Inputs / Outputs in a script's GUI. If there's more to it than that please let me know. In all other Python coding I've done ...
4
votes
2answers
133 views

Iterate an intersect between polylines and polygons in QGIS using Python script

I have a shapefile made up of 127 separate polygons that represent different districts. Overlaid on this layer is a polyline layer of 2800 streets, some which are completely bound by the polygons and ...
0
votes
1answer
47 views

How do I export data to a new table?

This is my script and I need to create a new attribute table which contain the information on the print line. Could someone help me? import arcpy from arcpy import env import datetime env.workspace= ...
1
vote
2answers
85 views

QGIS Tool Scripting Help with “Select by attribute”

** I've gone back and edited (shortened and focused) my own question QUESTION: Why am I getting the error message "The following layers were not correctly generated: Output", when writing a script ...
1
vote
1answer
58 views

qgis-processing: how to specify optional outputs?

Suppose a script has a variable number of outputs, which may or may not be produced depending on settings: ##Input_layer=vector ##Output_1=output vector ##Produce_output_2=boolean ##Output_2=output ...
3
votes
0answers
53 views

Possible to create AutoCAD-like grading lines in ArcMap?

I often need to show grading for roads and ditches. This is what the map readers require and what the standard symbology for grading is. These 3D lines can be easily created in AutoCAD civil 3d and ...
0
votes
1answer
60 views

Creating a Python Script [duplicate]

Is there any information out there on how to start creating scripts using Python and QGIS 2.10? I only have a little coding experience and an very unsure of how to start. My first script would ...
-3
votes
1answer
78 views

How to write a script that will merge shapefiles? [duplicate]

We use an application called IntraMaps Roam. Our guys go out in the field, mark up their maps with GPS points, and then bring them back to the office. They will copy their shape files to the server ...
2
votes
0answers
149 views

GeoServer 2.7.1 fails to start after installing 11-Aug-2015 scripting extension

This problem does not appear to be version specific for me. I have tried this several times with different versions and different system configurations. As the title states, when I add the script ...
1
vote
0answers
24 views

Point to point best link finder, need script?

I am planning a point-to-point microwave system in a geographically very hard area where it is full of mountains. I was searching if there is a way that I set a point and then script a code to search ...
1
vote
3answers
162 views

Processing modeler: how to dissolve a vector layer and sum the attributes

I have a complex workflow prepared in the processing modeler, but I'm missing one step to link all the model. I need to dissolve a polyline vector in a single line vector that has as attribute the ...
0
votes
0answers
28 views

Creating and running custom scripts on a Geoserver

Is it possible to write custom scripts on a Geoserver. I need a script that can capture a WFS Request for some polygons etc. But instead of getting it from the Geoserver data base. I need to take that ...
-1
votes
1answer
42 views

Feature Attribute Count Script

Using an arcpy script how do I get the feature attribute count per feature class in a fileGDB? Ideally I would like to output to a spreadsheet, with the feature class name in one column and the ...
1
vote
1answer
123 views

How to clip Census tract shapefiles to the boundaries of City Council shapefiles

Before I ask my question, I want to say upfront that I am woefully inexperienced with coding as well as GIS, which is part of the reason why I'm here. I am currently working on a project where I am ...
-2
votes
1answer
72 views

Fail to publish GP as a service

I have no idea what the issue is here, I created this scripting tool which works fine when I run it through ArcGIS desktop. However, for some reason, I am unable to publish the tool as a service.The ...
3
votes
1answer
49 views

Redirect remote shell command output to ArcMap geoprocessing tool display?

I have a Python script that runs a shell command on a remote server (using the Fabric module). When I run the tool in the debugger, I see all the output scrolling, as the command can take hours to ...
0
votes
0answers
30 views

Implementation of script for bus waiting stops

I've tried to add waiting time in bus stops in several ways (elevation fields, sub-segments, etc), but nothing worked. I'm now trying to use this script I've found in Internet: if (SourceID of ...
1
vote
1answer
82 views

How to generate WFS, WMS by scripting

I'm want to generate wfs and wms from postgis database. To do this i want to make a scripting with python (or with another language) to store my shapefile on geoserver and then deploy services ...
1
vote
1answer
56 views

Generate maps from different columns of shapefile with QGIS

I have a shapefile with N columns describing different attributes of some features. I would like to generate a grid of maps, where each map is a different column. Visually, I'm thinking of something ...
1
vote
0answers
72 views

Hex grid from layer bounds issue

I'm trying to use the 'Hex grid from layer bounds" script to reproduce the simple "Mapping density with hexagonal grids" from the Learning GIS book. When I run the script "as is" I get the error: ...
0
votes
0answers
31 views

Writing Script for establishing parameter files for MRT

I have 15 years of MODIS data that I need to mosaic and resample using the MRT program. But to do so I need to set up parameter files for every date as there are multiple files for every day in the ...
0
votes
0answers
51 views

Python snippets from QGIS

Out of curiosity and perhaps for practical reasons, is there a way to obtain Python snippets from QGIS 2.8 the same way you do in ArcGIS? Please don't redirect me to some other question that looks ...
4
votes
1answer
210 views

Why can't I copy values from a virtual field to a non-virtual field using PyQGIS?

Using the python console, I am trying to copy values from a virtual field into another non-virtual field. Both fields are integer types but I get NULL in the non-virtual field. I followed the answer ...
3
votes
1answer
350 views

QGIS' Join Attributes by Location not working from Python script

I have a shapefile with points, and a shapefile with polygons. I want to sum the attribute value of all points that are within a certain polygon, and I'd like to do this for each polygon in my ...
3
votes
1answer
60 views

How to access CRS of shapefile in standalone script?

I'm trying to access the CRS of a layer and use this to create a grid. I followed the answer in this post which works great in QGIS but I would like it to work in a standalone script. Here is a ...
2
votes
1answer
186 views

Arcpy: formatting string for file name

I have the following question about formatting a string which I use to create output file names. I loop a SearchCursor to create .png file. I extract two columns form the cursor e.g. "GMS_ID" and ...
0
votes
0answers
87 views

How to create a Shapefile of a subset of input features in PyQGIS?

I'm having some trouble applying my Python skills to develop some scripts in PyQGIS. For me it's far simpler to write it in ArcPy, but then again I wouldn't get that much satisfaction after finishing ...
1
vote
1answer
169 views

QGIS Python Scripting permission denied

I've just started a Python Scripting tutorial on QGIS. The problem arrives right at the end, when I have to use this script: output_file = open('c:/Users/Ujaval/Desktop/airports.txt', 'w') for f in ...
2
votes
0answers
113 views

Enable LWGEOM for OGR tools (QGIS 2.8)

I am doing some scripted operations on a Spatialite DB using OGRINFO, OGR2OGR etc. in the QGIS 2.8 OSGEO4W shell. Unfortunately, LWGEOM functions such as ST_Split() are unavailable and ...