Questions tagged [qgis-processing]
Spatial data processing framework that brings advanced analysis capabilities to QGIS.
1,595
questions
0
votes
0
answers
7
views
SAGA in QGIS using SAGANG shows errors: Library not loaded: '@rpath/gdalplugins/3rdparty/libltidsdk.9.dylib')
Running SAGA algorithms from QGIS throws up a list of errors about not being able to load a GDAL plugin libltidsdk.9.dylib:
ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/...
0
votes
0
answers
16
views
CrossTabManagerError appears in creating changes map while using MOLUSCE Plugin in QGIS
I'm using QGIS 2.16.0 Wein and the Plugin MOLUSCE(ver. 3. 0. 13). Now I'm trying to create a change map, but get the following error.
Traceback (most recent call last):
File "C:/...
2
votes
1
answer
76
views
Generating offset line from MultiLineString in QGIS
I have a MULTILINESTRING in my CSV file, and I want to generate a copy of it offset to the right by a few meters. I've run Single Sided Buffer, and Offset Lines, and neither of them seem to generate ...
0
votes
0
answers
25
views
Problem Polygon Line Intersection - SAGA QGIS
I have a ShapeFile with a series of polygons (ex: the yellow line is the common boundary between 2 polygons). I have another ShapeFile that contains a line (Pink) which crosses the limit line of these ...
4
votes
1
answer
44
views
Problem to interface a script with python in QGIS
I have a problem with some python code that I'm trying to interface into qgis. This script works via python console but not when I try to implement it as a tool.
The goal of the code is to get data of ...
1
vote
0
answers
40
views
RuntimeError: wrapped C/C++ object of type AlgorithmDialog has been deleted - Custom Processing Script
This is my first real project for QGIS so I'm completely in the dark for the best practices. I'm working on a custom processing script within QGIS. Simply put the script uses the 'extract by location' ...
0
votes
0
answers
41
views
QgsProcessingAlgorithm.initAlgorithm() is abstract and must be overridden
If I create a processing script from the template provided, I get this error (that is spammed every time I open QGIS)
I couldn't figure out a way to get rid of it
(despite the error, the scripts I've ...
3
votes
1
answer
209
views
Where is the source code for the Processing Plugin "Buffer"?
Context: In the Graphical Modeler, I want to use an attribute of my source layer to set the buffer distance parameter. Using the "Pre-calculated Value" option, and entering the attribute ...
3
votes
1
answer
56
views
Run processing tools in Python console
I have created two scripts for my QGIS project. I need to do a manual step after the first script for the second script to work. The second step involves a QGIS tool called "join by nearest"....
0
votes
0
answers
22
views
Extract specific lines from multiple layers
In QGIS I have 16 layers (polygons) which represent the extents of shoreline erosion/recession at different time scales and scenarios into the future. Each layer contains 10 polygons. What I want to ...
1
vote
0
answers
51
views
Setting output layer names in processing algorithm with stepwise parameter increment in QGIS
I run a processing algorithm in QGIS in an iteration with a stepwise parameter increment from numeric model input A (minimum) to numeric model input B (maximum) by a fixed step size.
Here's what the ...
5
votes
1
answer
124
views
Installing a custom Processing algorithm for all users
QGIS is installed for all users on a Windows machine.
A custom Processing algorithm stored in a file named alg.py should be made available to all those users by storing it in that QGIS installation. ...
0
votes
0
answers
25
views
Fill sink problem in deliniation
Why doesn't the Fill Sink algorithm appear in the toolbar? How can I make it appear? my qgis is 3.34 version
3
votes
1
answer
65
views
What is the equivalent of native:aggregate() in QGIS Field Calculator?
I have two layers which I want to connect using the aggregate() function with the Field Calculator. I can do this using the processing tool:
processing.run("native:aggregate", {
'INPUT' :...
-1
votes
1
answer
616
views
Semi-Automatic Classification Plugin Error on install required python library remotior_sensus
I have been trying to install the semi - automatic classification plugin but it results with the following error:
semi automatic classification plugin : Error, please install the
Python required ...
0
votes
1
answer
25
views
QGIS Whitebox processing provider in standalone
When developing an application (e.g., custom algorithms) that rely on a custom processing provider (e.g., WhiteBox tools), it can be useful to run/develop as a standalone app (i.e., not within QGIS). ...
2
votes
2
answers
151
views
Creating vector grid in QGIS for two different polygons without overlapping
In QGIS I have the data for all the continents except Antarctica. Now I want to create a grid of size 1km * 1km for each country however the problem I am running into is that if I take two ...
1
vote
0
answers
34
views
QGIS processing plugin doesn't show layers in dropdown menu (QgsProcessingParameterFeatureSource)
I'm trying to work up a minimal processing plugin. I'm using the basic plugin program generated by Plugin Builder. The only change I've made is to configure the input of the feature source to be a ...
0
votes
0
answers
29
views
Process to Open Multiple Vector Tools at one time
I don't even really know how to ask this question correctly, but I have a process that I am doing which requires quite a few steps of opening a vector tool, running it, taking those results and ...
0
votes
0
answers
18
views
Parameter not respected in formula (in PyQGIS script exported from QGIS Processing model)
To demonstrate my issue with @parameters in formulas: I created a simple QGIS Processing model where an input_layer is buffered with buffer_distance. In addition the buffer_distance should be written ...
0
votes
1
answer
78
views
Correct way to specify Inputs and Outputs for QGIS processing scripts that use custom widgets?
Processing scripts do not allow parameter inputs to be changed by other parameter inputs. This can be overcome by defining a custom widget which does have the desired interactions, then using a '...
0
votes
0
answers
25
views
QGIS - Processing framework - QgsProcessingParameterFeatureSource type
I use QGIS to build a script with processing framework. In processing toolbox menu I wan't to "filter" data with data types. I can filter point/line/polygon vector layer but how can I filter ...
0
votes
0
answers
36
views
The map color display in GEE and QGIS is different
I'm new to in Google Earth Engine and QGIS. Lately I try to export map from Google Earth Engine and then i opened the map in qgis. Sadly, the map color in Google Earth Engine is not the same in QGIS. ...
1
vote
1
answer
78
views
Choosing the correct predicate for calculating mean patch area per grid cell in QGIS
In QGIS, I have two vector layers - one vector layer is basically a grid, where each grid cell is of size 100x100m, while the other vector layer is Building Footprints data (a collection of polygons ...
0
votes
1
answer
67
views
QGIS - QgsProcessingParameterFeatureSource - Filter input layer
In QGIS, I try to write a script for a custom toolbox. I'm using the processing framework logic and following official documentation. I add an input vector layer, but I can't handle it has a ...
0
votes
1
answer
34
views
Create one-sided-ellipsoid from 'geometry by expression'
I am looking for a way in which, I can create a buffer around a point.
The buffer is meant to be a semi-ellipsoid.
In theory it should be a mixture of 'single_sided_buffer' and 'make_ellipse' ...
0
votes
1
answer
32
views
processing.run wont work with filter on layer
I have a pyqgis script in my plugin. There I like to execute a process:
new = processing.run("native:splitwithlines", {'INPUT':QgsProcessingFeatureSourceDefinition('table-path-to-the-db', ...
3
votes
1
answer
43
views
PyQGIS: Remove a legend item NOT the whole layer from the project
I have a number of vector layers and, occasionally, an image basemap.
I am creating a layout programatically based on this data.
I have a legend but I have zero want or need for the basemap raster ...
0
votes
1
answer
84
views
How to chose a Vector layer, chose a field, then chose values using parameterAsEnums
I'm coding an archaeological site prediction model. Researchers are able to load multipolygons (i.e. soil type, landform), choose the field to 'weight' or 'rank'. My data has both soil and landform ...
0
votes
2
answers
71
views
Buffer coming out to be a circle
I have been trying to make a buffer for the roads but the buffer is coming out to be a huge circle. Both the project coordinates and Shapefile coordinates are the same. Any pointers on how to solve ...
3
votes
2
answers
148
views
Accessing layers from QgsContext transferred by completed QgsTask using PyQGIS
We have a headless QGIS standalone script that needs to run some I/O intensive layer retrieval tasks, each as parallel background threads before doing further GIS processing.
We are invoking our ...
2
votes
1
answer
105
views
'Could not load source layer for INPUT: invalid value' error in PyQGIS
I'm trying to implement a processing plugins in QGIS 3.28.9, but when I hit Run, it gives me a message that my polygon layer is not a polygon layer, but, it is a polygon, in fact. Can someone help to ...
1
vote
0
answers
59
views
IDW processing not running as expected in standalone script
I'm trying to automate idw interpolations from my database using PyQGIS in a standalone script. I copied the python command from the GUI which is how I got the fields I am using for the algorithm.
...
2
votes
1
answer
82
views
NameError: name '__file__' is not defined when getting the path of the current script using PyQGIS
I am trying to run a script in the QGIS Processing Script Editor, but I get the following error:
If I run the script from the PyQGIS console it works thanks to this changes in the console_editor.py (...
3
votes
1
answer
97
views
Turning table with lat and long columns into point layer in QGIS
I have a table as a layer in QGIS. It includes two columns: "Lat" and "Long".
I would like to use these as geometry columns.
How would I do this without saving and reloading a ...
2
votes
1
answer
54
views
QGIS boundary select smaller polygons that are contained within larger polygon
I have two layers which are perfectly nested. There are dozens of SA1 polygons (thin grey outline - see image attached) within the LGA polygon (thick green outline - see image attached). I would like ...
1
vote
1
answer
81
views
PyQGIS 3.22 custom processing script, problem inputting raster and processing zonalstatistics
I'm writing a custom processing script, based on the template, using QGIS 3.22 running on Windows 11. The script runs well as console script, but I want to make it into a custom processing script. ...
0
votes
0
answers
74
views
QGIS Plugin - How to automatically add point cloud layers to QGIS at the end of a processing tool?
I'm adding some tools in a plugin that handles point cloud layers.
At the end of a tool, I'd like that the project adds automatically the output point cloud layer created. I tried using ...
1
vote
1
answer
67
views
QGIS Python scripting: CRS changes not working as expected
In QGIS 3.28 I have layers with a user defined projection. It is simply Transverse Mercator with a custom central meridian. It shows up as EPSG:10000.
Predictably, $area calculations return NaN.
If I ...
1
vote
1
answer
50
views
Using "selectbyexpression" command in standalone PyQGIS script
Is it possible to run "selectbyexpression" in a standalone PyQGIS script? Inside QGIS, I was using iface to add the map to the interface and now I don't know how to run it without using ...
1
vote
1
answer
69
views
Creating automatically shortest way network between given point objects via OSM roads (without overlaying line objects) in QGIS
I am trying to automatically generate a grid between point objects (buildings). The grid should be automatically laid over public roads. So far I use the QGIS Processing Tool "Shortest way (...
0
votes
2
answers
33
views
QtPy Running a process looping through features
I'm writing an iterator to run a processing on an individual feature of a layer.
In this example: gray region included green bordered cells and black points. I want to run a processing 'count points ...
0
votes
0
answers
28
views
Use matrix input for a custom QGIS processing plugin
I'm trying to create a custom processing tool inside my QGIS plugin. The goal is to have:
An input for multiple layers (this is working)
A matrix with a dimension of (nb_layer, nb_layer) that let me ...
0
votes
1
answer
21
views
How do I use 'grass7:v.net.spanningtree' from the QGIS python console?
Assume there are map layers named filtered_edges and points. I have written the following in the QGIS python console:
import processing
fe = QgsProject.instance().mapLayersByName('filtered_edges')[0]
...
0
votes
0
answers
30
views
Set FID field name in a GPKG processing algorithm ouput
I have a standalone pyqgis script that uses processing algorithms. The final output is a GPKG layer, and I want to define the name of the FID field (that by default is fid).
The relevant code is ...
0
votes
0
answers
23
views
QGIS Processing plugin: "NameError: name 'standard_library' is not defined"
I've created a processing plugin using the "plugin builder" in QGIS 3.32. Unfortunately the plugin does not load in processing as it throws an error:
" NameError: name 'standard_library'...
0
votes
0
answers
40
views
QGIS Reclassify by Table With Expression
With QGIS Reclassify by Table I am trying to reclassify a raster within a model with a formula that uses statistics from the raster layer I want to reclassify. The formulae I am trying to recreate are:...
0
votes
1
answer
64
views
QGIS Processing Toolbox removed Scripts
I was working with adding a new script to toolbox in QGIS but the script wouldn't show up there. Then when I tried again the Scripts tool has disappeared altogether. I have checked in settings and it ...
1
vote
0
answers
42
views
Fail during georeferencing an old map
I want to georeferencine an old map, but unfortunately, it failed.
I use QGIS 3.28 LTR to conduct this task. The process which I have conducted as follows:
This is the projection which is written in ...
1
vote
0
answers
13
views
Setting numeric values in new field based on length and branches in QGIS
I'd like to know how to set incremental numeric values in a new field of a layer, which has been obtained by "shortest path from point to layer", based on the length and the branches. I need ...