Questions tagged [qgis-processing]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

QGIS - Get a parameter enum [QgsProcessingParameterEnum] list to update another parameter enum once the user selects them [duplicate]

I have a QGIS (v3.8) processing python script that has 3 lists I'd like to filter dynamically off each other upon a user selection. How can I get a parameter enum [QgsProcessingParameterEnum] ...
0
votes
0answers
17 views

Adding new attribute field to processing output algorithm in PyQGIS?

I have a processing script that will carry out a selection by expression of the input layer, then do a join attributes by location with a join layer. The next stage will be to add a new field and ...
3
votes
0answers
25 views

Pyqgis: Added raster layers do not show up

I have a list ("datList") with names of raster layers which I want to add. When I add raster layers in the python console everything works fine: for da in datListe: layerDir = "C:/[path]/" + da ...
2
votes
1answer
42 views

ERROR IN processing.run('qgis:countpointsinpolygon',XXX)

When I tried to write a python script to run Count points in polygon (https://docs.qgis.org/2.8/en/docs/user_manual/processing_algs/qgis/vector_analysis_tools/countpointsinpolygon.html) in QGIS, I ...
5
votes
1answer
103 views

In-place modification from Python

I would like to run a geometry processing algorithm from the Python console while using the Edit features in-place modifier. I copied the output from the processing history to see if it works, e.g: ...
3
votes
1answer
55 views

Multi-thread processing in QGIS 3.8

I have an I7 quad-core processor in my laptop. I use QGIS 3.8 to do dissolve jobs on large polygonsets. The biggest set takes 131 minutes. If I look a the load monitor I see my system on a constant ...
2
votes
1answer
38 views

Adding fields to temporary layer using PyQGIS?

I want to add some fields in a temporary layer in order to use it in another process. What I tried to do is below : shp_result = processing.run( 'native:pixelstopoints', { ...
1
vote
1answer
28 views

v.voronoi.skeleton error

Recently, I was looking for way to skeletonize buffer and besides solution with PostGIS and Postegre solutions there is algortihm v.voronoi.skeleton. I have tried to use it with different road/rail ...
1
vote
1answer
34 views

How do I clip the result of my QGIS 3.x Processing python script before returning the output?

I have written a simple QgsProcessingAlgorithm that populates a QgsFeatureSink. Before outputting the result, I need to call another algorithm to clip my features. Everything seems to work just fine, ...
0
votes
1answer
33 views

SAGA in QGIS toolbox not using files from PostGIS database

I need to find the correct path to use tables and views from a PostGIS database in QGIS. The database was populated importing shapefiles with QGIS DBmanager, and then other tables and views where ...
0
votes
0answers
54 views

QGIS 3.8 Batch Processing AttributeError: 'BatchInputSelectionPanel' object has no attribute 'value'

I installed the latest version of Qgis (3.8.0). When I try to run batch processing for contours, it gives me this error Is anyone else experiencing this? I cant seem to find a quick solution to this ...
1
vote
0answers
30 views

Create points on street line between two intersecting streets in QGIS

I have a table which contain fields "Street", "From", "To" and "Number of potholes". "Street " showing the street line where the potholes are. "From" and "To" are street names which define part of ...
1
vote
0answers
24 views

Loading temporary layer in processing PyQgis 3.4 [closed]

I have been working on processing script in PyQgis 3.4 and i have serious issues with loading temporary layers to project after processing. Since following code works perfectly fine: entimport ...
2
votes
1answer
34 views

Why QGIS3 is not running processing models and scripts in background?

I have a problem with QGIS 3.6.0 on macos and QGIS3.2.3 on Windows7 with running processing scripts and models in background. According to QGIS3 docs they are run in background thread by default (if ...
2
votes
0answers
25 views

How to automate locally QGIS plugin building steps using exe or script?

I have made a plugin name Area Calc on my local computer. The plugin work very well. I have followed this. I don't want to release plugin. Is there any way to automate the whole above task through a ...
1
vote
0answers
22 views

Creating a dataset from attributes in QGIS Graphical Modeler

I need to select just a field from a dataset to compose a model in QGIS 3.4 modeler. How could I extract this field from the main dataset while creating another one?. I've tried with Drop field(s) ...
1
vote
0answers
33 views

'QgsProcessingProvider' object has no attribute

I'm trying to do a simple conversion of a polygon to vertices and I get an error that says: AttributeError: 'QgsProcessingProvider' object has no attribute 'isSupportedOutputValue' Traceback (...
1
vote
0answers
44 views

QGIS crashes when trying to return layer from processing toolbox console

The following script is intended to take a polygon layer and extract the features having a particular value ('natural') in a given field ('landuse') and return the selection. Everything seems to work ...
1
vote
0answers
38 views

How to use a plugin in the QGIS 3.4 toolbox

I have version 3.4 of QGIS and I want to generate a model, so I need SCP tools (unsupervised classification). I can not find a way to add it to the tool box in order to finish my working model.
1
vote
1answer
66 views

Automatic correction of many topological errors in shapefile?

I have a database with topological error. In particular I have an overlay of polygons. I would like to correct these errors. I thought to use an automatic procedure since I have a lot of errors. I ...
2
votes
1answer
35 views

Erasing boundaries between polygons that are next to each other using QGIS?

I have files that representes individual houses and blocks. I want to have a file that represents a residential area in a block. Is there a way to erase the line, boundaries, between polygons that ...
3
votes
0answers
53 views

Processing a Sqlite table in standalone QGIS application

I have been trying to use a single table of a Spatialite db in a standalone Python application. I have run it through the QGIS interface to find how it used the input pathway, which was: 'dbname=\'C:/...
1
vote
1answer
30 views

Doing pairwise or pixel wise raster comparison using PyQGIS & Processing Scripts?

Do you know how to do a pairwise o pixel wise raster comparison using PyQGIS or Processing Scripts? Pairwise or pixel wise comparisons are made between two raster datasets pixel by pixel. That means ...
1
vote
0answers
26 views

Classifying coordinates on land/on water using QGIS very slow processing issue

I'm very new to QGIS. I have a problem related to the "select by location" tool of QGIS. I have loaded 10 different layers into my map containing data of waters (rivers, canals etc.). Now, I want to ...
1
vote
0answers
16 views

Using the Range input parameter in QGIS Processing Model

I have built a model which requires a range of integers between 0 - 13 as an input. I am using two different Number parameter inputs, Minimum and Maximum, which works, but is somewhat awkward because ...
1
vote
0answers
94 views

ImportError: cannot import name 'QgsGeometryAnalyzer' from 'qgis.analysis'

I am trying to do a buffer analysis of my shapefile by Python script but I have this problem in every beginning. The warning message is: ImportError: cannot import name 'QgsGeometryAnalyzer' from '...
3
votes
1answer
66 views

Looping through file names in QGIS?

I am working with a Mac OSX El Capitan, QGIS 3.4.5 Madeira and Python 3.6.1. I have a question which I believe is essentially a python one but applied into QGIS. I intend to program some algorithms ...
2
votes
1answer
92 views

Error in batch process converting raster from .img to .tif in QGIS 3.4.8

I'm a long time GIS user but new to QGIS. I can convert single raster files in .img format to .tif files in QGIS 3.4.8 without any issues. However, I cannot batch process the same files. The Python ...
1
vote
0answers
42 views

Using GRASS v.surf.idw in PyQGIS? [closed]

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
21 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 ...
1
vote
1answer
44 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
82 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
18 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
50 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
19 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
vote
1answer
47 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
62 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
31 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
51 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
27 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
52 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
60 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
110 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
24 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
127 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
76 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
63 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 ...