Stack Exchange Network

Stack Exchange network consists of 175 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.

0
votes
1answer
37 views

Updating two or more fields in QGIS?

I have 5 layers: NAM_USA (It has four fields of our interest, named 'bare', 'sand', 'woody' and 'built' depicting feature counts in each of the below corresponding layers.) Baresoil Woodyland ...
1
vote
1answer
62 views

Exposing GRASS GIS add-on in QGIS Processing framework?

Having QGIS and GRASS GIS 7 installed, how can I expose a GRASS GIS add-on, which has been installed using g.extension, in QGIS' Processing framework?
0
votes
0answers
19 views

Looping group of layers and keeping another layer on in QGIS?

While using loop visible layer plugin, it simply makes a loop of a predefined group of layers, rest of the layers are turned off. What I want is to keep a vector layer on and visible all the time ...
3
votes
1answer
76 views

Date formating in QGIS using expression?

My expression: day(now()) || '/' || month(now()) || '/' || year(now()) returns current date as 15/4/2019, but I want to get the date in dd/mm/yyyy format i.e. 15/04/2019. How can I get that using ...
1
vote
1answer
37 views

Processing: QGIS Crash with new processing script format, QGIS 3.6.1

I've just started to use the new (3.6.1) processing script format (see https://github.com/qgis/QGIS-Enhancement-Proposals/issues/134 or https://anitagraser.com/2019/03/02/easy-processing-scripts-...
2
votes
0answers
35 views

QGIS Python plugin crashes when using processing algorithms and QThread

I'm developing a QGIS plugin which calls several processing algorithms. I call them in a pipeline where the input layer of each algo is the output of the previous one. The pipeline is called on each ...
1
vote
0answers
45 views

Road distance travelled between multiple postcodes

Is there anyway of using QGIS offline... not using API... I want to calculate road distance travelled between multiple postcodes to single destination.. it works perfectly for small number (200) but ...
1
vote
1answer
30 views

QGIS 3.4, how to add .qml style to sink in processing

How can I import a .qml style from a file and apply it to a sink? In QGIS 2.18, I used something like that script: output=QgsVectorLayer ('Point?crs=EPSG:2154','output', 'memory') path_style='./...
1
vote
0answers
31 views

Returning a new vector layer with additional setup from a processing algorithm in QGIS 3

I am working on a processing script in QGIS 3, which does the following: Take a few inputs Run a native algorithm on these inputs, saving the resulting new layer in memory Set up the symbology for ...
0
votes
1answer
59 views

How to obtain the maximum two values of a field, without having to do it manually in the attribute table?

I have a layer of points corresponding to the vertices extracted from a polygon, and from these I need to obtain the two maximum values and save them in a new layer of points. Because I have more ...
1
vote
1answer
38 views

Running a non-QGIS Python 3 script within QGIS 3.4 processing toolbox just like that of QGIS 2.18

I've written around 30 scripts (both QGIS and non-QGIS scripts) in Python 2.7 and using it through QGIS 2.18 "Processing -> Scripts" tools so that within our office we can share and use the scripts. ...
1
vote
1answer
38 views

How to update the attribute table of feature using PyQGIS?

Following code updates the value of field ("name") in console and shows the result but actual attribute table does not get update .Can anybody suggest the error in code. layer=iface.activeLayer() ...
1
vote
1answer
31 views

Algorithm addgeometryattributes not found

I am trying to find area and perimeters of Polygon using Pyqgis3. I tried manually first Vector->Geometry Tools->Add Geometry Attributes. By doing so, I get the area and perimeter column in the ...
0
votes
0answers
32 views

How to get full attribute list of selected feature in PyQGIS?

Following code gets the feature which is chosen by mouse click.But I want to get list of all of the attribute name and values using script of that selected feature.Can anybody provide the method ...
1
vote
1answer
113 views

pyqgis processing, grass: --overwrite does not work

I have a QGIS plugin that tries to call the v.clean algorithm multiple times in a row and use the same output file each time the algorithm runs through. But even though I set the --overwrite parameter ...
1
vote
0answers
34 views

processing.runAndLoadResults() does not load the result QGIS 3.4.5

I am trying to execute an algorithm and load it in the layer tree when it is done. After looking online I saw that I could use processing.runAndLoadResults() to load my result when the algorithm is ...
0
votes
1answer
21 views

Rasterizing MULTIPLE vector layers in same “grid” so I can do a regression of sorts across pixel units?

For my research, I have collected a bunch of climatic data from my state in vector form. I also have my raster data, which is about 60 points around the state that have a binary assignment of yes/no. ...
1
vote
1answer
55 views

Points Layer to Distance Matrix QGIS 3.6 - Noosa

I'm trying to calculate a sample distance matrix from four points in the BNG CRS: Using Vector-> Analysis Tools -> Distance Matrix, I get: Input point layer is a MultiPoint layer - first convert to ...
1
vote
0answers
22 views

pyqgis 3:how to identify partial intersections between a buffer (polygon) layer and pipe (line) layer?

I have a drains layer (polygon) around which I have created buffers of varying distances. I want to find the intersection between the different buffer layers and pipes (line) layer and accordingly ...
1
vote
0answers
28 views

Tabulating points from CSV that are within 1 km of points from another CSV using QGIS?

I have two sets of data. One that is from a csv and contains a relatively small amount of data (we will call location data), and another csv that contains a larger dataset that contains environmental ...
1
vote
2answers
41 views

How to delete multiple columns in the QGIS processing model?

I made the union of two tables I want to erase some columns. How can I do this automatically?
2
votes
1answer
59 views

Error loading layer in QGIS using Iface

While I was trying to load a vector layer (Shapefile) from the desktop directory into the QGIS using the iface variable data is not loading and user name in location of the status message is showing ...
0
votes
0answers
27 views

Developing and desirably debugging pygis-3 processing scripts?

The writing of processing scripts in QGIS3 changed substantially. On the basis of many tutorials/blog posts and answers on this site I got a running processing script in QGIS3. But it was, for a lousy ...
2
votes
1answer
22 views

How to provide GDAL algorithms that require multiple layer input in the graphical modeler?

Some GDAL algorithms such as gdalbuildvrt or gdalmerge require the selection of input layers. How to make an entry in a graphical model from a list provided by the processing flow?
2
votes
1answer
43 views

Computing Shortest Path Distance for multiple points in QGIS

I have been looking for ways on how to compute the shortest distance between one point to multiple points using a specific road network. I have not been successful in achieving the solutions in this ...
0
votes
0answers
23 views

ECW errors on ubuntugis

i have successfully installed the ECW support on ubuntu qgis. the main challenge that i have is that whenever i try and load an ecw file, the qgis main window crashes. On the other had i am able to ...
2
votes
0answers
73 views

Join attributes by value in QGIS 3.4.3 Processing Modeler

I want to add only a few specific columns from the join table but there is no drop down list. When selecting manually I'm able to select only 1 column when trying more than 1 I'm not getting the ...
4
votes
1answer
63 views

Using if statement in R script within QGIS

I am creating an R script in QGIS and I am facing an issue with an if statement. First, I declare the input from the user ##Which_S2_bands_do_you_want_to_use=selection 2 3 4 5 6 7 8 11 12;2 3 4 8 11 ...
2
votes
1answer
39 views

Using multiple Boolean variables in R script within QGIS

I am testing the capabilities to run my R script in QGIS. I am facing a basic question. I am defining a dropdown menu with all the parameters for a specific variable: ##test1=group ##Sensor?=...
2
votes
0answers
39 views

automatically georeference QgsGeometry.fromPoint features on creation

Is there a way to automatically georeference fromPoint features upon creation? I use this layer URI: self.pinLayer = QgsVectorLayer( "Point?crs=epsg:3857&field=id:integer&...
1
vote
0answers
50 views

Processing algorithm doesen't work in standalone script - PyQGIS 3.4

I am trying to execute the processing algorithm extractbylocation. Anyway, firstly I run that algorithm in QGIS3 and then just copy the code from the processing history and changes paths to variables. ...
3
votes
1answer
85 views

Load lines from .OSM in Processing Modeler

I'm trying to add some data in OSM file format in a QGIS 3.4 Graphical Modeler. I'm interested in the line type of data (layer ID 1) inside .osm file but I can only access point data (layer ID 0). The ...
2
votes
1answer
101 views

No output from GRASS 7 r.reclass in Processing Python script

I want to run the r.reclass tool in python on a raster layer to reclassify 1 value (and leave the rest the way they are). Here is my best attempt so far, after trying to reference documentation and ...
6
votes
1answer
131 views

Graphical modeler calculator missing in QGIS3

There used to be a calculator in the modeler-only tools in QGIS graphical modeler. But I notice that it is missing in QGIS3. How do I do numerical calculations as part of the model? For example, take ...
2
votes
1answer
69 views

Create a drop-down menu in a QGIS Processing script?

I'm trying to write a QGIS processing script using the new API (3.4), but I hardly find any documentation. Based on this excellent resource by Anita Graser (https://anitagraser.com/2018/03/25/...
3
votes
1answer
90 views

Modeling iterative processes in QGIS 3

In the QGIS version 2.X, there was an Iterative Button from the algorithm also available for the algorithm used inside the processing modeller. Actually, I use version 3.2 and 3.4 and can not find it....
1
vote
0answers
51 views

Getting rid of qt.qpa.plugin Error? [closed]

I am trying to execute standalone python script outside QGIS. But when I try to initialize Qgs Application , it give me below error . I don't have any idea how to get rid of it . from qgis.core ...
1
vote
0answers
101 views

Using GRASS in Python script QGIS 3

I am creating a Python script in QGIS 3 and I want to use the processing module. I want to transform my raster file to a vector file with the GRASS algorithm r.to.vect. My problem here is that the ...
4
votes
1answer
216 views

Unable to load output layer from Python algorithm in QGIS 3

I'm building a Python algorithm for QGIS 3, to be run from the Processing Toolbox. I've finished debugging the algorithm body, which seems to work, but QGIS is unable to load its output. To summarize,...
2
votes
2answers
44 views

Selecting features of a shapefile using attributes of another shapefile

A newbie here trying to learn QGIS for work. How can I select specific features of a polyline with the same values as the attributes of the buffer polygons I generated? I have a layer of polylines ...
1
vote
1answer
25 views

Multiple steps in runandload

How is it possible to perform multiple processing steps for one layer without creating additional ones? I wanted to add several fields to attribute table using qgis:fieldcalculator but every time it ...
2
votes
0answers
74 views

What am I missing to get GRASS 7.6 tools to run in QGIS 3.4.4 Processing (linux)? [closed]

I can't seem to get any GRASS 7.6.0 algorithms to run inside QGIS 3.4.4 Processing toolbox on Arch Linux (kernel 4.20.8). I have GRASS installed at /opt/grass. Launches fine standalone with tools ...
1
vote
1answer
62 views

How to get file path from vector layer object in QGIS 3.x processing framework?

Using the QGIS 3.x processing framework, given a vector layer as an input parameter: (from the default script template) def initAlgorithm(self, config=None): self.addParameter( ...
1
vote
0answers
50 views

Qgis 3.x: Python error when adding scripts to processing toolbox

When I add a script (any script) to QGIS 3.x I get the following Python error: NameError: name 'Uitvoermap' is not defined Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/....
2
votes
0answers
60 views

Line perpendicular to the maximum axis of an irregular polygon (sinkholes) QGIS 3

I am performing a morphometric analysis of dolines using QGIS 3. The analysis consists of determining the longest axis (the union of the two most distant points of the polygon) and the shortest axis ...
1
vote
1answer
44 views

Piping one SAGA Raster Calculator output into another chaining algorithms in QGIS processing script?

I am using QGIS 2.18.15. I want to streamline multiple SAGA raster calculator calculations using the output of one calculation (not loading it into the table of contents) as input raster for the ...
1
vote
1answer
72 views

Merging several .hgt files into one

I'm currently struggling on trying to combine several .hgt files with different software. I can get the 4 tiles into any kind of software but my issue is exporting the file back to .hgt file. I've ...
3
votes
1answer
63 views

SAGA Raster Calculator in QGIS Algorithm script produces 'NoneType' object has no attribute 'crs'

I would like to produce a new temporary raster after a calculation with the SAGA raster calculator using a custom python algorithm script. This is my code so far: ##MaechtigkeitunterhalbeinerHoehe=...
1
vote
1answer
26 views

SAGA Raster Calculator processing script give error “name 'Rasterout' is not defined”

I am trying to build a custom script using things I have learned from this post: Number inputs as raster calculator variables in QGIS Modeler This is my script so far: ##Maechtigkeit unterhalb einer ...
1
vote
1answer
84 views

Run pyQGIS algorithm on selected features in layer

I try to run algorithms on layers but only on selected features with QgsProcessingFeatureSourceDefinition in a loop and then write the result with QgsVectorFileWriter : layer1 = QgsVectorLayer(path1, ...