Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
0answers
8 views

Getting rid of qt.qpa.plugin Error?

I am trying to execute standalone python script outside QGIS. But when I try to initialize Qgs Application , it give me below error . I don't have any idea how to get rid of it . from qgis.core ...
1
vote
0answers
8 views

Using GRASS in Python script QGIS 3

I am creating a Python script in QGIS 3 and I want to use the processing module. I want to transform my raster file to a vector file with the GRASS algorithm r.to.vect. My problem here is that the ...
1
vote
0answers
21 views

Unable to load output layer from Python algorithm in QGIS 3

I'm building a Python algorithm for QGIS 3, to be run from the Processing Toolbox. I've finished debugging the algorithm body, which seems to work, but QGIS is unable to load its output. Here's the ...
2
votes
2answers
36 views

Selecting features of a shapefile using attributes of another shapefile

A newbie here trying to learn QGIS for work. How can I select specific features of a polyline with the same values as the attributes of the buffer polygons I generated? I have a layer of polylines ...
1
vote
1answer
22 views

Multiple steps in runandload

How is it possible to perform multiple processing steps for one layer without creating additional ones? I wanted to add several fields to attribute table using qgis:fieldcalculator but every time it ...
2
votes
0answers
26 views

What am I missing to get GRASS 7.6 tools to run in QGIS 3.4.4 Processing (linux)?

I can't seem to get any GRASS 7.6.0 algorithms to run inside QGIS 3.4.4 Processing toolbox on Arch Linux (kernel 4.20.8). I have GRASS installed at /opt/grass. Launches fine standalone with tools ...
1
vote
1answer
24 views

How to get file path from vector layer object in QGIS 3.x processing framework?

Using the QGIS 3.x processing framework, given a vector layer as an input parameter: (from the default script template) def initAlgorithm(self, config=None): self.addParameter( ...
1
vote
0answers
19 views

Qgis 3.x: Python error when adding scripts to processing toolbox

When I add a script (any script) to QGIS 3.x I get the following Python error: NameError: name 'Uitvoermap' is not defined Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/....
2
votes
0answers
56 views

Line perpendicular to the maximum axis of an irregular polygon (sinkholes) QGIS 3

I am performing a morphometric analysis of dolines using QGIS 3. The analysis consists of determining the longest axis (the union of the two most distant points of the polygon) and the shortest axis ...
0
votes
1answer
30 views

Piping one SAGA Raster Calculator output into another chaining algorithms in QGIS processing script?

I am using QGIS 2.18.15. I want to streamline multiple SAGA raster calculator calculations using the output of one calculation (not loading it into the table of contents) as input raster for the ...
1
vote
1answer
30 views

Merging several .hgt files into one

I'm currently struggling on trying to combine several .hgt files with different software. I can get the 4 tiles into any kind of software but my issue is exporting the file back to .hgt file. I've ...
2
votes
1answer
34 views

SAGA Raster Calculator in QGIS Algorithm script produces 'NoneType' object has no attribute 'crs'

I would like to produce a new temporary raster after a calculation with the SAGA raster calculator using a custom python algorithm script. This is my code so far: ##MaechtigkeitunterhalbeinerHoehe=...
1
vote
1answer
23 views

SAGA Raster Calculator processing script give error “name 'Rasterout' is not defined”

I am trying to build a custom script using things I have learned from this post: Number inputs as raster calculator variables in QGIS Modeler This is my script so far: ##Maechtigkeit unterhalb einer ...
1
vote
1answer
28 views

Run pyQGIS algorithm on selected features in layer

I try to run algorithms on layers but only on selected features with QgsProcessingFeatureSourceDefinition in a loop and then write the result with QgsVectorFileWriter : layer1 = QgsVectorLayer(path1, ...
2
votes
1answer
59 views

Finding the major axis of a polygon (the outline of a sinkhole or doline)

I am using QGIS to do a morphometric analysis of dolines (sinkholes). The dolines have different shapes from circular to elliptical and I need to calculate the major axis of the polygon that ...
0
votes
0answers
50 views

Python script randomly crashes QGIS

I'm trying to run a processing script in QGIS 3.4. It doesn't complete because it seems that step 3 is not generated. A few seconds later (after I got the error), QGIS completely crashes (I get the ...
0
votes
0answers
26 views

Deprecation warning when importing Processing in pyQGIS 3

I use QGIS 3.4 with Python 3.7 and I have a warning message when importing Processing like this : import processing from processing.core.Processing import Processing Here is the message : Using or ...
2
votes
1answer
41 views

Do Not Filter vs Ignore Invalid Geometries

In QGIS 3, What's the difference between "Do not filter (better performance)" and "Ignore invalid geometries"? Both can be found at Settings > Options > Processing > General Both are options to ...
1
vote
1answer
56 views

Getting log message from QGIS processing framework?

I run Python processing algorithms externally, and I want to get the log output I see when I run it from the QGIS 3 GUI at the log tab as shown in the screenshot: I want to get the full grey log ...
1
vote
1answer
33 views

Argument 1 has unexpected type 'set' Error using processing in QGIS?

I am currently working on a code that adds a field to a shapefile and inputs its filepath. I understand that the processing.run has changed from qgis 2 to qgis 3 but I am not sure why I am getting ...
1
vote
1answer
28 views

How to use SAGA Raster processing in processing scripts (QGIS3)

I want to make a processing script which uses the saga:inversedistanceweightedinterpolation algorithm (Interpolating a point layer - magnetometry measurements - to a raster. The SAGA runs so far but ...
2
votes
0answers
22 views

QGIS 3 processing script is recognized as a model

I refer to the QGIS 3 (QGIS 3.4.4-1, 64Bit standalone installer) processing script shown below. If I copy the script, do Create New Script... from the processing toolbox, paste it to the empty script ...
0
votes
0answers
22 views

Difference tool becomes unresponsive and causes QGIS (2.18.24) to crash

I'm trying to find the difference between two layers (the first is a manitoba wide shapefile and the second is a layer that narrows down the water bodies of manitoba selected from another canadian ...
1
vote
0answers
17 views

Adding field to multiple shapefiles including their designated filepaths as values using PyQGIS?

I am trying to create a script that navigates a directory and adds a field to a shapefile called "filepath" and then paste the file path in the rows of that parcticular shapefile. This is the code ...
2
votes
1answer
30 views

Missing R scripts in QGIS 3 after install

After install Processing R Provider plugin (v.1.0.1) in QGIS 3.4 I only got test.rsx. I'm able to create new scritps but I can't acess scripts already installed in my OS (Linux Mint 19.1) trough R ...
2
votes
1answer
45 views

PyQGIS Processing: “memory: not found”

I try to run a QGIS plugin in QGIS 3.4 that uses processing to execute algorithms in a row: params_snap = { 'input' : input, 'type' : 1, 'tool' : 1, 'threshold' : ...
3
votes
1answer
64 views

Adding extra parameter in QGIS processing in grass to close files after processing

The code below works but as this involves averaging thousands of files, grass shows an error message: Too many open files The code: ymax=31.4648437503 ymin=17.4068080185 xmax=-80.4330407378 xmin=-...
1
vote
0answers
36 views

Wrong or missing parameter QgsProcessingParameterFile QGIS 3.4 Python plugin

I'm making a script that can be called by the processing.execAlgorithmDialog function. For one of the parameters, I want to use the QgsProcessingParameterFile class for selecting a .csv file. I tried ...
1
vote
1answer
36 views

QGIS Processing Script - Add field to output

My objective is to add a new calculated field to the output layer from a processing script. This layer is created as follows:- source = self.parameterAsSource( parameters, ...
1
vote
0answers
34 views

Creating polygon from DXF file using QGIS?

I want to create a polygon from a DXF file. I used v.in.dxf to convert the DXF file to GRASS vector map format. when I run the polygonize algorithm, it gives me the following error message(here I used ...
0
votes
0answers
24 views

Select and make output points as required on QGIS?

I have two features: 1. Polygon (vector.shp). 2. Database (.csv). using processing modeler with below conditions: If no point in the cell, then leave as it is. If only one point, then pick that ...
2
votes
0answers
68 views

Error whilsted using QGIS 3.4.4 r.series batch processing [closed]

I'm having some trouble using the Batch Processing to perform r.series, Could anyone explain what I'm doing wrong? I'm using QGIS 3.4.4. Output Log: Processing algorithm 1/1… Algorithm r.series ...
0
votes
1answer
44 views

Summing flow from cities listed in another layer within QGIS?

I have transport flow represented by arrows within QGIS in one layer. The database is coded with cities ID for the origin and cities ID for the destination of the flow. I also have in another layer, ...
2
votes
1answer
59 views

Creating list of intersected polygons for each line using QGIS?

I have a line layer representing transport routes. I would like to add a virtual layer listing every city crossed by each line. I would only need the id of each city to be listed (column Code_INSEE)....
5
votes
0answers
103 views

Processing post-execution script hook to clear scratch layers?

I've been cobbling together some Processing scripts for QGIS 2.18 (I'm not a fan of QGIS 3 scripts), and I keep running into one particular problem: my script creates a lot of scratch layers and they ...
3
votes
2answers
161 views

How to automaticaly create a buffer for a line in QGIS

I am creating some lines, and I would like to add a 500m buffer around thoses lines. But i need this buffer to automaticaly change if i modify my line around. Is there any solution to this?
0
votes
1answer
49 views

Automatic calculation field based on line modification within QGIS [closed]

I have a polygon layer with every cities in my region. One of the field of this layer is the population of the city. I also have a line layer which represents some bus route I would like to ...
0
votes
0answers
16 views

QGIS 3.4 - Access Violation no RTTI data

i'm used to writing in C for embedded systems, so python is somewhat new to me. I've built up this script in QGIS script editor following the template. However, when I run the script I get an Access ...
2
votes
1answer
23 views

Using Plugin > Map Creator > Set Layer CRS

I am using map creator and I would like to permanently set the layer CRS value. I place multiple maps within one project on QGIS, and I have to manually set the CRS value each time a new layer is ...
1
vote
1answer
38 views

Determining True North from drone footage?

I recently surveyed a site using a drone (not my own). I have composited together roughly 20 images to form an overall image of the site; however, this composited image contains no metadata pertaining ...
0
votes
0answers
34 views

Dataset description AREA_OR_POINT

What are the differences between these two options in satellite image metadata?
2
votes
2answers
82 views

Using parameterAsSink in QGIS processing script?

Note I have edited this question to make it more direct and hopefully get a response. I am attempting to write a series of processing algorithms to automate and extend a workflow in QGIS 3.4. I have ...
3
votes
2answers
139 views

Plugin “processing” does not work - not possible to enable - QGIS 3.4.3 Madeira - Windows 10 Pro

The "Spatial data processing framework for QGIS" does not work anymore. Also known as "processing".... this tool can not be uninstalled... and it is disabled. QGIS 3.4.3 Madeira - Windows 10 Pro ...
0
votes
0answers
21 views

Save each record in a shapefile to a new shapefile or KML [duplicate]

I have created a shapefile of 13 polygons. Each polygon is a single-part feature. I want to create 13 new shapefiles where each each shapefile represents each record in the attribute table. I know ...
2
votes
1answer
74 views

QGIS Python ignore invalid geometries

In QGIS 3.4 I can run algorithms under the General setting "Invalid features filtering" -> "Ignore features with invalid geometries" However, when I try Processing through Python functions like the ...
2
votes
1answer
53 views

Launch Processing tool UI in pyqgis

This is a duplicate of Launching Processing tool User Interface using PyQGIS. However, the answer provided is not correct for QGIS 3.4.1. from processing.gui.CommanderWindow import CommanderWindow ...
1
vote
0answers
51 views

How do you view your Python scripts in the processing toolbox in QGIS 3?

I have been stuck on this for a while and I'm not sure if it is a bug or me doing something wrong but I cannot work out how to add Scripts to the processing toolbox in QGIS 3 series. When I click the ...
2
votes
0answers
32 views

Does any body knows if there are a ArcSDM version or port for QGIS?

ArcSDM is a series of python analysis tools for ArcGIS developed by Don Sawatzky, Gary Raines y Graeme Boham-Carter in 2010. At present is maitained by the University of Campinhas, Brazil and ...
2
votes
0answers
61 views

QGIS 3.4 Processing Python Scripts folder default configuration is lost

I have lost the default configuration of the 'Processing Python Scripts folder' on QGIS 3.4 and in consecuence some Python processing scripts and plugins cannot work properly because they cannot find ...
0
votes
1answer
49 views

DEM File “not found” Error when running r.watershed with Processing Toolbox in QGIS 3.4.2 with GRASS

I have downloaded a DEM from the NASA server with "SRTM Downloader". I want to find the watershed area, so I run the "r.watershed" function form the Processing Toolbox. However, I got a multi- "...