5

Thread safety QGIS Processing algorithms can be thread-safe or not. According to the docs, the latter are : [...] algorithms which manipulate the current project, layer selections, or with external dependencies which are not thread-safe. You can run the following code snippet in a QGIS Python console (Ctrl+Alt+P) to obtain a list of QGIS Processing ...


3

I encountered this problem. Some processing tools worked in QGIS 3.8, but doesn't work in QGIS 3.4. I don't know the reason, but changing native word into qgis in all processing.run ("native:tool_name", ...) solved the problem. (native:intersection -> qgis:intersection)


3

You have another function for doing this: from processing import execAlgorithmDialog params = {} # A dictionary to load some default value in the dialog execAlgorithmDialog('qgis:extractbyattribute', params)


2

In QGIS 3.4, the SAGA provider is already a core plugin. Therefore, you can also change the SagaAlgorithmProvider.py file directly, by: sudo nano /usr/share/qgis/python/plugins/processing/algs/saga/SagaAlgorithmProvider.py then change the REQUIRED VERSION from 2.3. to 7.3. This worked for me.


2

General strategy for the solution: Compute dissolved buffer area by road width. (Tool: Buffer) Create bounding box of road layer. (Tool: Extract layer extent) Remove the portion that overlaps the dissolved buffer. (Tool: Difference) Convert multipolygon into single polygons since the result of 3 is a multipolygon. (Tool: Multipart to singleparts) PyQGIS ...


1

I was able to solve this by adding a vector layer input to the script and adding it to the project from the script itself before exporting the layout. layer = self.parameterAsLayer(parameters, 'LAYER', context) p = context.project() p.addMapLayer(layer) Now this script can be used inside a model where it takes the styled vector layer generated in the ...


1

You may also use the Snap geometries to layer processing tool: This algorithm snaps the geometries in a layer. Snapping can be done either to the geometries from another layer, or to geometries within the same layer.


1

For future reference: in May 2019 the "Make Valid" tool was added to the core QGIS 3 Processing toolbox, as "Fix Geometries" within the Vector Geometry group.


Only top voted, non community-wiki answers of a minimum length are eligible