Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [qgis-processing]

Spatial data processing framework that brings advanced analysis capabilities to QGIS.

2
votes
1answer
35 views

Batch Processing in QGIS 3.4 appears to be disabled

I was trying to batch reproject several layers in QGIS 3.4.2 via Processing. However, after setting up my batch and clicking Run, nothing happened. Identical procedure in QGIS 2.18.26 LTR works fine. ...
3
votes
1answer
34 views

pyqgis - post-processing of layer output of QgsProcessingAlgorithm

While extending a plugin with a Processing Provider and a set of algorithms I mostly followed the defaults of Plugin Builder 3. So, the basic code is smth along the lines of class ORSisochronesAlgo(...
2
votes
1answer
37 views

QGIS3.4 Madeira crashes when calling print()

I am using the pyqgis template from underdark for showing the crash. Her script is running like a charm, but as soon as I add a print("finished...")-call in her code, QGIS3.4 Madeira crashes. You can ...
1
vote
0answers
35 views

Cannot see GRASS Processing Error(s) in QGIS?

I'm trying to run r.neighbors in QGIS 3.4.1-Madeira and can't find the log that comes up with what looks like a red error message. I've also tried a couple of other GRASS processing tools and they ...
0
votes
0answers
54 views

DEM - calculate shortest/easiest path over mountain range [duplicate]

In QGIS, I have a mountain range with a valley on either side (DEM raster file). Is there software or a plugin that allows me to calculate the easiest pathway over the mountain? The answers at Cost ...
1
vote
2answers
51 views

Output layer from PyQGIS 3 processing script is empty

I've created a processing script in QGIS 3, and although my output layer has shows a feature count greater than zero when using the feedback command, the resulting feature layer that appears in QGIS ...
0
votes
1answer
29 views

Dissolving using PyQGIS?

I have trouble to use function dissolve to dissolve polygons by field value in PyQGIS3. In PyQGIS2 this line was doing the job: QgsGeometryAnalyzer().dissolve(ki, "name.shp", onlySelectedFeatures=...
1
vote
1answer
30 views

Run processing only in layers with selection

First of all, I am really begginer with PyQGis... I am trying to run a random point algorithm in different vector layers of a folder. But I dont want to do it for every polygon, only for selected ...
2
votes
1answer
58 views

How to open GPKG layer fo processing in QGIS

I am making a model with QGIS 3.4 graphical modeler that should open and process a layer from the GPKG located in the project folder. Since the folder path may be changed, and QGIS does not allow ...
2
votes
1answer
34 views

KeyError when trying to set attribute in QGIS?

I have two input vector layers and I want to create an Output vector layer by doing some calculations. But somehow, the setAttribute method does not work. In QGIS 2.18, I was able to set an attribute ...
0
votes
0answers
13 views

Why is i.histo.match missing from QGIS 3.x?

I'm trying to normalise and then mosaic two ASTER scenes (multiple bands in each). The GRASS tool i.histo.match has been suggested in a few places, but it isn't listed in the processing toolbox for ...
-1
votes
0answers
27 views

Getting Processing script name [QGIS 2.18 ]

With PyQGIS Processing 2.18.xx, I would like to get the name of the current processing algorithm to define the log tab with tag variable. I want to avoid to to define a second time the script name. ...
1
vote
0answers
39 views

QGIS3: How to set an attribute value?

I have written a python script which has one output line-vector layer. The python script should calculate some value and then the script should set the attribute (with that value) of a newFeature (...
0
votes
0answers
54 views

Running SAGA on QGIS 3.4.1 (Ubuntu 18.04)

after a long struggle to get SAGA (2.3.1) even appearing in the toolbox of QGIS 3.4.1 (on Ubuntu 18.04), I am encountering the problem that all algorithms I have tried so far give the same error: ...
2
votes
1answer
48 views

Removing overlapping polygon boundaries within same layer in QGIS

We are building mosaic datasets for 100's of rasters (Topo sheets). Used QGIS Tile_Index to get the raster_topo_sheet's extent as vector. But the issue is, overlaps near the edges of all the topo ...
0
votes
0answers
27 views

Why in Qgis the method “Zonal Statistics” is faster than when I run the method from the command line?

When I execute the Zonal Statistics algorithm, according to the official website, the creation of the output files becomes slower than when the procedure is performed by the own program. I would be ...
1
vote
3answers
33 views

Attribute errors with selectbylocation algorithm

Could anybody tell me what is wrong with execution of processing.run('qgis:selectbylocation', layer2, layer, u'intersect', 0) layer2 and layer is QgsVectorLayer object. This is error message I got
0
votes
0answers
19 views

Pass additional options to GDAL in QGIS v3

I'm using gdalwarp inside a QGis v3 model (using qgismodeler) and I'd like to pass the -tap option to the command. I can't find where to place this. Is it possible to add additional options to gdal ...
4
votes
1answer
139 views

Error using grass v.clean: “ 'utf-8' codec can't decode byte… ”

I try running the v.clean tool using QGIS 3.4. As input I use a vector line layer (I checked the validity and everything is fine), but running the algorithm I get the following error: Traceback (most ...
1
vote
1answer
41 views

Why does the algorithm shortestpathpointtopoint in QGIS3 using pyqgis only work in the second run?

A part of my skript uses the shortestpathpointtopoint algorithm, but it does only work in the second run (Python Console within QGIS). The discussed part of the script looks like points_lyr = ...
1
vote
1answer
15 views

QGIS r.walk.points Movement Directions raster exeeds input raster

I am very new to GIS, so excuse my potentially poor terminology. I am trying to create a cost surface in qgis. I have an raster with elevation data. Based on that I created a slope with the DEM ...
2
votes
1answer
41 views

Updating $geometry in QGIS processing modeler?

I'm creating a Qgis model with Processing modeler. I can't find how to update the $geometry field from a WKT field. If I complete the step by step process, I used the field calculator with the formula ...
1
vote
0answers
46 views

QGIS export selection to shapefiles is extremely slow; using only 5 to 10% CPU

I am using QGIS 3.2.3. I am trying to do some simple actions. Selecting by attribute and exporting to shapefiles. I am using a OSM file as a source which is barely 60MB. But for some reason the ...
1
vote
0answers
36 views

Error interpolating in Qgis

I'm trying to interpolate with the algorithm "v.surf.idw" in Qgis version 2.18 Las Palmas. The data that i'm using are points whose coordinates were loaded by a CSV file, these the guade as a new ...
3
votes
2answers
50 views

Unable to save attribute table after creating new attribute in QGIS?

I have little to no GIS experience. My workplace has no GIS capabilities. I am using QGIS 3.0.2 (64 bit) on Windows and I created a new attribute for a vector layer (shapefile) through the field ...
0
votes
0answers
23 views

QGIS 3.0 input layers for Python script [duplicate]

I have just updated from QGIS 2.18 to QGIS 3 (Madeira) and I want to run a self-written Python script. My Python script has two input-layers which I usually imported with the processing.GetObject('...
1
vote
1answer
97 views

Checking SAGA version from a python plugin in QGIS 3.4.0

I use QGIS 3.4.0 on Windows and I want to verify SAGA version with processing.algs.saga.SagaUtils.getSagaInstalledVersion(). But I get an error: module 'processing' has no attribute 'algs' This was ...
1
vote
0answers
49 views

Shortest route batch calculation in QGIS 3.2.2 with v.net.path GRASS GUI

I have three shapefiles: road network, postcodes and destinations. I`d like to calculate the shortest route between the postcodes and destinations (multiple points in each layer) Could anyone ...
2
votes
1answer
48 views

How to use “Merge vector layers” in QGIS using Geopackages as output with FIDs duplicated

I'm using QGIS 3.2.3 in Windows and I created a tessellation with polygons (Voronoi tiling / Thiessen polygons) with the built-in tool "Voronoi Diagrams", (Call this layer LAYER1). Afterwards, I used ...
1
vote
0answers
35 views

Running an external QGIS Python Plugin with a Processing Script

I am working on a python script in the processing environment of QGIS 2.18. My goal is to run few tools one after another in an automated chain. One of these tools is the external Plugin 'Join ...
1
vote
1answer
36 views

Relating input data to output data in GRASS in QGIS 3

In QGIS 3 there are a number of useful vector tools available via GRASS functions. However, the output of many of these only contain 'cat' attribute in their output. For example, if I run the routing ...
4
votes
2answers
73 views

Bug of QGIS when using “multipart to singlepart”?

I used yesterday, in QGIS 3.2.3 the tool to convert multiline to a single line ("multipart to single part"). I chose the option of the command "multipart to single part" the geometry feature (line) ...
0
votes
0answers
37 views

How to Host QGIS Plugin

I want to host QGIS plugin such that anyone with the host link could be able to upload his data and see the output on QGIS desktop in the web browser. I tried to search on the internet, all I could ...
3
votes
0answers
35 views

QGIS 3 - Save processing output to memory and turn into numpy array?

I'm currently developing a python plugin for QGIS 3. In short, the code conducts among others a viewshed algorithm, turns the output in a numpy array and calculates some spatial metrics the user can ...
2
votes
0answers
25 views

Clipping outside QGIS with PyQGIS?

This is my first script and I having a problem trying to clip a shp file. I'm running on a linux server and this is my code: #! python from datetime import date from qgis.core import * from PyQt4....
1
vote
0answers
10 views

“Cannot find variable: staticmethod” message while running Processing script

Every time I run my own processing script in QGIS 2.18.22 I get this message fifteen times in Processing tab in Log Messages Panel : 1 Cannot find variable: staticmethod 1 Cannot find variable: ...
1
vote
1answer
47 views

Get R scripts from on-line scripts collection

I have QGIS 2.18 installed on Win 10, I tried to add online R scripts from processing toolbox, but i get errors. "Python error: An error has occurred while executing Python code: See message log (...
2
votes
0answers
49 views

Using Union tool in QGIS?

Here is my scenario: I am trying to use Union to combine the land and mangrove shapefiles in QGIS and to compute for the areas of each individual geometry. What I did: First, I cleaned them. Upon ...
6
votes
3answers
139 views

Programmatically changing line lengths in QGIS?

Provided a set of lines with various lengths, I would like to change their lengths (hence, changing their geometry) to a specific value, using their centroid as base point. I have checked the ...
1
vote
0answers
38 views

QGIS 3 processing script won't show gui when executed from editor

Different from QGIS 2, when I execute a processing script from the Processing Script Editor by pressing the Play-button in QGIS 3 it's GUI is not created. Seems to me that the initAlgorithm() method ...
3
votes
1answer
111 views

Update processing scripts in QGIS 3

When I edit a processing script (QGIS 3.2) with right click > Edit script... in the processing toolbox, save it and then try to execute it by double clicking it in the processing toolbox, the version ...
1
vote
1answer
67 views

PyQGIS scripts outside of QGIS GUI running processing algorithms from GRASS provider

I'm writing a script that I would like to work outside of QGIS GUI. The script uses the processing algorithm standalone just fine for the native algorithms, however I am experiencing errors when ...
1
vote
1answer
71 views

Access string output of QGIS 3 processing script in graphical modeler

In the good ould days of QGIS 2 I created a processing script, that takes as input a table and a table field (table has only one record) and returns the string attribute value of the table field: ##...
1
vote
0answers
20 views

Converting QGIS Processing Modeler Python (.py) file to (.svg)

A Processing Modeler can be saved in QGIS 2.18.15 as a Python (.py) file. Adhering to good advice by @Spacedman in an earlier thread, I wish to know what are the many ways the (.py) files for the QGIS ...
2
votes
0answers
22 views

Backwards compatibility for QGIS 3.2.1 Processing Modeler [duplicate]

I have created multiple models using the Processing Modeler in QGIS 2.18.15. However, I could not open these .model files in the user interface for the Graphical/Processing Modeler in QGIS 3.2.1, ...
5
votes
1answer
62 views

Do I need to have QGIS installed on a machine to make use of it's python libraries?

I'm trying to make a simple stand-alone app to expedite the production of some site plan maps for my work. The maps are very formulaic, and follow a set template every time. With the QGIS libraries, I ...
1
vote
0answers
47 views

Embedding QGIS Python Script in C++(Qt Creator)

Is there any way that I can embed and use QGIS Processing algorithm written in python on Qt Creator using C++. If so how can I share the layer and other instances created in C++ with the embedded ...
1
vote
1answer
77 views

QGIS Python troubles with 'processing'

I have made a script for multiple clipping raster images with a shapefile as follow: ##Clip Multiple Rasters with Vector=name ##Utilities=group ##RASTERS=multiple raster ##VECTOR=vector ##OUTPUT=...
1
vote
0answers
29 views

Missing toolbar and panel from graphical modeler in QGIS

Does anyone know how I can turn on the toolbars and panels of the QGIS 3 graphic modeler? I closed them and now I do not know how to enable them again, consequently only a blank window appears. I'm ...
1
vote
1answer
31 views

Pyqgis Qgis2 override Processing framework settings doesn't work

Inside my Python plugin (qgis2.18) I use some Processing algorithms. I'm trying to override the Processing setting that allows using only the selected features. I' want to set it to False and ...