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.

1
vote
0answers
18 views

Using GRASS v.surf.idw in PyQGIS?

I have a point shapefile I am trying to run the GRASS v.surf.idw tool on in python. Here is a link to the data: https://github.com/tanyahelena/qgis_data I have a short script which runs. I don't get ...
1
vote
0answers
18 views

Close files handlers used by processing:runalg(“qgis.difference”…) or os.popen("gdalwarp -q -cutline…)

How can I do to close all files used by functions that I use in my plugin like processing:runalg("qgis.difference"......) os.popen("gdalwarp -q -cutline.......) After runing my function, if I ...
-3
votes
0answers
18 views

Overlay mapping [on hold]

I have 10 layers with the same lat-long but different values. I have plotted these values like a mesh (using square symbols ). Now I wish to plot these 10 layers at one plot with 1-10 as an overlay. I ...
0
votes
0answers
20 views

AttributeError: 'NearestNeighbour' object has no attribute 'dlg' [closed]

I am learning to make my first python plugin named NearestNeighbour(different from the one we have in QGIS3, name are coincidentally same) which take two vector layer. With the help Qt Creator I was ...
1
vote
1answer
25 views

Area Value not getting reflected in attribute Table using PyQGIS?

I have a WardBoundary.shp file in my project. I need to find the area of each polygon ( representing different wards).With the help of this comment on Adding Area column in Polygon layer using PyQGIS?,...
-1
votes
1answer
49 views

Adding Area column in Polygon layer using PyQGIS? [closed]

I have a WardBoundary.shp file with Polygon Features in it. I have to calculate the area of each Polygon and write into attribute Table. I can do manually by using '$area` but I need to automate ...
1
vote
1answer
14 views

How to get Memory layer dispalyed in Vector Panel List using Pyqgis?

I have two point layer in my Project Centroid.shp and Nodes.shp.I have used Distance Matrix to find nearest Nodes point from Centroid Point. I have saved the output in FinalDistance.csv. The ...
0
votes
0answers
20 views

QGIS 3.6--Error— Creation of data source failed: unable to open database file

I have been working on 3 predators' data layer files. I created a vector point shapefile for each predator prior to do a heatmap (GeoTIFF file) for each data layer file. In order to extract 50% of ...
2
votes
0answers
15 views

How to use the GRASS GIS v.net.timetable tool in QGIS?

The GRASS GIS v.net.timetable tool needs the following input information: (a) a vector layer with the network (b) a vector layer of points (from - to) (c) and the timetable. The GRASS manual on the ...
-1
votes
0answers
20 views

Calculating sum of parts of column based on another column using Statistics by categories

I am working on QGIS3 where I have written Python code (executing inisde QGIS Python console) where I need to calculate sum of parts of column based on another column. With reference to Calculating ...
1
vote
1answer
35 views

QgsApplication.processingRegistry() loads providers however is empty when called in within class function

I am in the process of building a standalone interface to QGIS to use the processing functions. In essence I am creating a mainWindow GUI with a Qgsmapcanvas. The GUI also includes some user inputs ...
1
vote
0answers
34 views

Migrate processing scripts from QGIS 2 to QGIS 3

In QGIS 2.x I use this simple script to reverse the direction of a vector layer: #!/usr/bin/env python # -*- coding: utf-8 -*- # define Interface ##QGIS tools (QGIS 2.x)=group ##Reverse vector ...
1
vote
1answer
17 views

Generate vertices on line with respect to point on line

I have a road layer in line and point layer snap over line i.e. road layer. I had use QGIS 3.4 "snap geometry to layer" but no vertices are generated on the line layer. Now I want to generate vertices ...
0
votes
1answer
23 views

Geophysical Gravity/Magnetic data CSV to QGIS to Shaded Contour

I am learning how to use QGIS and I have some geophysical data; aeromagnetic and gravity data that I would like to visualize. The data is currently in CSV format and I am unsure how I should go about ...
0
votes
0answers
48 views

Using Processing qgis:extractbylocation?

I try to use the processing 'qgis:extractbylocation' in QGIS 2.8.2 from the QGIS algorithm provider #Récupérer tous les départements qui s'intersectent avec la zone d'étude res=processing....
2
votes
0answers
23 views

Clipping vector by iterating through input clippers using PyQGIS?

I have a python script that I want to work in QGIS 3.0. #importing all necessary modules import processing, os, glob result_path =("/home/brent/Documents/Hansen_new_data/Regions_Min/Province/TI/CADT/...
1
vote
0answers
41 views

QGIS union (one vector layer): side location conflict?

I occurred an error when using "union" tool (only one layer) in QGIS. I have a series of vector files, yet only one vector file fails to union with the error information. The error is: GEOS ...
2
votes
1answer
69 views

Points to path algorithm - is it possible to keep the attributes in the new file (lines) from the source file (points) [closed]

In my dataset of points, I need first to group points by ID, sort them by time and for each group to draw a line by time order. And for that processing algorithm points to path works perfectly. But my ...
0
votes
2answers
55 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 ...
2
votes
1answer
89 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
23 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
91 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
53 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
47 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
46 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
2answers
60 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
36 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
62 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
47 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
54 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
44 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
35 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
128 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
49 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
27 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
76 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
33 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
50 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
64 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
46 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
24 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
79 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
28 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
102 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
64 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
42 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
50 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
64 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
112 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 ...