Questions tagged [qgis-processing]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
13 views

Is there a way to add a new attribute to a QgsFeature object?

I have tried reading the docs located here but there is no mention of any method that allows you to add new attributes to the feature only modify existing ones. Something along the lines of: ...
3
votes
3answers
106 views

Assigning point attribute to overlapping polygon in QGIS

Are there a way to assign the attributes of a point to a overlapping polygon? I got the data as lines and points. The lines are making the polygons and the points are overlapping the created polygon ...
0
votes
0answers
23 views

Convert QGIS tools to Python [closed]

I am writing a standalone Python script to process QGIS commands on my rasters. I am trying to use the align raster tool from QGIS and have found the following documentation https://qgis.org/pyqgis/3....
1
vote
1answer
36 views

QGIS Processing tools give wrong results

I want to get a vector layer that would be water area around Europe. Seems easy enough, I got world shoreline, cleaned it up a bit, created a scratch layer on which I put a rectangular polygon to be ...
0
votes
0answers
20 views

processing.run('qgis:linestopolygons', ...) does not work properly

I am writing a QGIS plugin and for part of the process, I want to transform a Line layer (connected lines) into a Polygon layer. For this, I am using processing.run('qgis:linestopolygons') command. ...
5
votes
2answers
126 views

Tool for exporting vector layer in QGIS

I am looking for a tool in the toolbox which gives me exactly the options that "Export Layer" is giving me (see screenshot) because I want to use it in a model. For example, I want to cut ...
1
vote
0answers
23 views

Using Temporary Layer/not loaded Layer in Field Calculator

I'm writing a processing script with the given tools from the toolbox. Now I want to use the Field Calculator to add a column to an output layer of a tool. The Field Calculator/column should contain a ...
4
votes
0answers
30 views

Increase tolerance of QGIS processing tools

I have 2 line layers in QGIS 3.22.0 and I create a 10cm-buffer around line layer A (red) perform a difference of line layer B (blue) with the buffer of layer A (light red) As a result I get 1 ...
2
votes
0answers
22 views

How to store geometry as string in QGIS model?

I am building a model in QGIS that automatically projects a raster or vector layer to the appropriate UTM zone. The principle is not hard; ultimately it's just an intersect. However I'd like to ...
0
votes
0answers
14 views

Looking for suggestions on "exploding" a GeoTIFF by the parameters of a boundary layer

I have a GeoTIFF that contains the LandFIRE vegetation data for a particular county. I also have the shapefile for parcel data in the same county. My goal is simply to associate the LandFIRE ...
0
votes
1answer
12 views

Having trouble applying stamens toner style to SQLite lines layer in QGIS

I am an absolute QGIS/GIS beginner using 3.22 QGIS software. My goal is to load a sector of the United States with the stamens toner lite style. I downloaded my data from geofabrik. I then used ...
7
votes
1answer
105 views

Looking for QGIS equivalent of ArcGIS "Adaptive Smoothing" tool

I am trying to find a tool that is similar to "Adaptive Smoothing" (found on ArcGIS) on QGIS. What I am trying to do is eliminate narrow drainages (narrow corridors less than 6 m wide). This ...
0
votes
0answers
29 views

Displaying non processing QGIS plugin icon in processing toolbox

I am developing a QGIS processing plugin that has many algorithms. Apart from various processing algorithms, there is one tool that is non-processing. I would like to display them all together to the ...
1
vote
1answer
60 views
+50

Loading another QGIS processing algorithm window from processing algorithm

QGIS Processing class has a method execAlgorithmDialog() that opens the dialogue window of any processing algorithm. I am writing a Plugin that has a processing algorithm Run Analysis, I also need to ...
1
vote
0answers
27 views

Looking for definitive way to enable ALL QGIS module access in VS Code (Windows 10)

I'm having trouble importing and getting code inspection/autocompletion working for all the PyQGIS modules I need to do scripting in VS Code. After looking at these questions: Understanding qgis....
2
votes
0answers
25 views

What is the difference between QGIS PostProcessorInterface and postProcessAlgorithm

QgsProcessingLayerPostProcessorInterface.postProcessLayer() vs QgsProcessingAlgorithm.postProcessAlgorithm() They both seem to post-process a layer like style it or change its display name. What are ...
1
vote
1answer
70 views

Feed an existing raster to QGIS Raster Destination Parameter in QGIS Processing Algorithm

I am writing a QGIS python script. In the script, I am using QgsProcessingParameterRasterDestination class to ask the user where do they want to save the output raster. For any other QGIS processing ...
1
vote
1answer
50 views

Adding output layers of QGIS processing scripts to group using PyQGIS

I have a QGIS python processing scripts that return multiple rasters. I want to return them in a group named 'Aligned'. There is nothing in the context.addLayerToLoadOnCompletion() function to specify ...
2
votes
0answers
20 views

QGIS 3.16.13 Batch Processing - Is there a way to turn off dialog prompts?

After recently updating from an outdated version of QGIS to the latest Long Term Release, 3.16.13, the behavior of Batch Processing for the Refactor Fields vector tool has changed. Each time a layer ...
0
votes
0answers
60 views

Internationalization of QGIS processing scripts

How can one translate QGIS processing scripts GUI and user messages to other languages ? The QGIS documentation explains how to translate Python plugins, but not processing scripts.
2
votes
0answers
18 views

Property from Expression in Shell Script

I am using qgis_process in a shell script (Linux) to make a buffer using a field as the distance. I can get a buffer from the shell with qgis_process run qgis:buffer INPUT=pt.shp OUTPUT=buffered.shp ...
0
votes
0answers
27 views

GeoTIFF blurring with Python

I want to blur the TIFF file using Python. The pipeline in the following: I open the image in rasterio as np.array I blur the array with cv2.blur function I save images with metadata using rasterio ...
2
votes
1answer
73 views

Using "Select by expression" in processing script context with PyQGIS

Is there a way to select features and use them in subsequent algorithms within a processing script context? I am looking to iteratively selectbyexpression a subset of line features in a layer based on ...
3
votes
1answer
63 views

Changing output layer's name in QGIS processing plugin

I am writing a plugin to convert degree to DMS format. I want to name the output layer containing name of source layer. For example source layer name 'Polygons_WGS84', output layer '...
2
votes
2answers
56 views

PyQGIS 3: Cannot Pass Memory OUTPUT To Next Processing Algorithm As INPUT

I am attempting to convert some ArcGIS arcpy command-line scripts to PyQGIS and am running into a problem working with memory layers. The script takes several vector files as input and progresses ...
1
vote
1answer
40 views

QgsProcessingParameters Checkable Combo Box option?

Is there a simple method in the QgsProcessingParameters class for a checkable combo box option? I cant seem to find the function described in the offical documentation or figured out any alternative. ...
2
votes
0answers
78 views

Error: Algorithm not found using grassprovider in PyQGIS standalone script

With QGIS 3.22 the GRASS algorithms got its own provider (grassprovider.Grass7AlgorithmProvider) and are no more part of processing.algs. Knowing this, in a standalone pyqgis-script I am trying to add ...
4
votes
1answer
106 views

Working with layer variables in rule-based styling query builder in QGIS

I want to make an "Action" in QGIS 3.16 that enables me quickly to style features I select in the rule-based styling. The action code below produces a string of the selected features, and ...
1
vote
0answers
25 views

QGIS 3 - Model Designer - PostgreSQL execute and load SQL- Change output name

I am using the Model Designer in QGIS to create a tool and I am using the PostgreSQL execute and load SQL algorithm to add my query. The output is a layer loaded in QGIS named SQL layer. Is there a ...
3
votes
1answer
44 views

Creating different numbers of random points inside polygons using PyQGIS

I am developing a plugin using PyQGIS and PyQt5. I am calling qgis:randompointsinsidepolygons, where I am trying to give field input at VALUE parameter. It will take a variable number of points for ...
1
vote
2answers
42 views

Removing Multiple Layers With Same Name in Layer Selection

For some of my QGIS projects, when I select a layer in a Processing Toolbox dialog I find multiple entries for some of my layers, as shown below: There is one layer named "point," and one ...
1
vote
0answers
48 views

SAGA tool is showing issues or it is not competible in QGIS 3.16.11 LTR

I have installed in my Windows QGIS 3.16.11 LTR and wanted to use some of the function from SAGA tools, when I open the function it is telling that the SAGA officially does not support for this ...
2
votes
1answer
41 views

Creating QGIS processing script parameter with multiple Rasters

I'm trying to create a QGIS script that would use multiple Raster layers as an input parameter. But QgsProcessingParameterRasterLayer only gives a single Raster as input and ...
2
votes
2answers
72 views

QVariant error when converting DataFrame into attribute table using PyQGIS

I have a df which looks like that: ID Happy 0 Very 1 Little I'm trying to convert it into an attribute table: headers = [col for col in df.columns] fieldlist = QgsFields() fieldlist.append(...
6
votes
2answers
145 views

"Line Intersections" tool does not create point where lines intersect

When I use the "Line Intersections" tool in QGIS, it doesn't create whole intersect points. Also, the gif and picture below show that the lines intersect but the plugin doesn't assign any ...
0
votes
0answers
23 views

GRASS Hough transform issue [duplicate]

Via GRASS I installed the Hough transform. I start the Hough transform but it doesn't give any rendering time and the rendering doesn't finish. The image I used; (Canny edge detection applied image) ...
2
votes
1answer
42 views

QGIS 3 batch processing - INPUT value not correct when autofill

I want to batch process with Clip function (also problem with any other). I have several input layers. I would like to autofill the output Clipped parameter with name of the input feature and _clipped ...
2
votes
0answers
40 views

"Snapped geometry has invalid geometry" error when snapping geometries to layer

I have two shape layers in QGIS where I want to use the "Snap Geometries to Layer". I get the error message that several polygons of the Reference layer have invalid geometries: Feature (1) ...
4
votes
1answer
79 views

Run QGIS Processing Algorithms on Multiple Input Files Using a Standalone Script

I'm new to QGIS(3.20.2), and have even less experience with python. I've been working on automating a simple task and have been having difficulty tying together the pieces of information that I've ...
1
vote
0answers
34 views

Running a QGIS processing model using qgis_process

I am trying to run a QGIS processing model (.model3) standalone using qgis_process. It works when running single algorithms, but I am having trouble running a model file. How would a correct call look?...
1
vote
2answers
62 views

QGIS batch processing- autofill creating new entries

When attempting to use batch processing of any tool, I run into an issue when selecting input files. Using the Seeded Region Growing tool (SAGA) for example, here is my workflow and issue: there are ...
1
vote
0answers
43 views

QgsProcessingException when running standalone script

My task is to run QGIS in standalone script. All the modules import correctly and I am running QGIS in conda environment. Error occurs when running the processing.run() command QgsProcessingException: ...
1
vote
0answers
46 views

Processing one single huge DEM in QGIS

I am working on a hydrological model and I needed a DEM for the entire watershed, so I had to merge multiple DEM tiles in order to cover all of the watershed. There were 34 tiles to merge in total. I ...
5
votes
2answers
120 views

Adding temporary output of processing algorithm to the map canvas using PyQGIS

Let's say I run a simple algorithm like this import processing # https://docs.qgis.org/3.16/en/docs/user_manual/processing_algs/qgis/vectoranalysis.html?highlight=count%20points%20polygon#id3 ...
5
votes
3answers
162 views

What is algorithm name for "Count Points in Polygon" using PyQGIS?

I want to count points in polygon, using PyQGIS. When I check the documentation, I find the description of the {parameter_dictionary}, but not the algorithm name which must also be provided. What is ...
0
votes
0answers
52 views

Updating existing features in PostGIS using QGIS processing model

When writing to PostGIS using a QGIS processing model, I don´t see an option for updating existing features, just adding new ones. Is this use case covered in QGIS?
1
vote
0answers
47 views

Renaming CSV file attributes in QGIS processing model

I am trying to rename/add attribute names in CSV file that doesn´t have any attribute names (the data starts att the very first row), so I would like to add attribute names using QGIS processing. How ...
1
vote
0answers
26 views

GEOS_ERROR ParseException Unknown type MULTILINESTRINGZM

i have a MULTILINESTRING layer in posgis table and I wand to add new features from export layer using some algorithm in QGIS processing and Python but the export layer from QGIS processing has type ...
2
votes
1answer
27 views

Interpolation Error: Saying it is completed but doesn't show up

I am using processing toolbox Saga Interpolate (Cubic Spline) tool. I then enter the details needed interpolating and click Run. I get a task complete sign but don't get the file. In the Interpolate ...
1
vote
1answer
49 views

Intersections (line and polygon) taking long time in QGIS

I'm intersecting some lines with polygons in QGIS v3.20 and it is taking a very long time to run the tool (hours and hours). The linework is complicated and had a large number of attributes. Likewise, ...

1
2 3 4 5
28