Questions tagged [qgis-processing]
Spatial data processing framework that brings advanced analysis capabilities to QGIS.
1,624
questions
57
votes
10
answers
89k
views
Missing Processing Tools in Vector Menu of QGIS
I'm missing all the usual processing tools in the Vector menu in QGIS 2.16 (e.g. Vector Overlay, Analysis, etc). They do appear in the processing toolbox but there's no sign of them in the Vector menu....
44
votes
3
answers
60k
views
Ignoring invalid input features with Intersection tool in QGIS?
In QGIS 2.18, when I used the Vector > Geoprocessing Tools > Intersection tool, I was able to check an option which said "Ignore NULL geometries [optional]".
Now I've downloaded QGIS 3.2 and that ...
42
votes
5
answers
4k
views
Generating equal sized polygons along line with PyQGIS
I would like to create polygons along a line to use them for AtlasCreator in a next step.
ArcMap has a tool called Strip Map Index Features.
With this tool I can choose the height and width of my ...
41
votes
3
answers
15k
views
Using QGIS Processing algorithms from PyQGIS standalone scripts (outside of GUI)
I am writing a script which must work outside of QGIS GUI. I call some API functions from qgis.core but I would like to use the processing plugin.
I am able to import processing with sys.path.append() ...
37
votes
7
answers
46k
views
Fixing geometry validity errors in QGIS 2
I am working on ownership data at a US county level. I have one shapefile per county that contains thousands of tax parcels. I need to dissolve the polygons representing parcels owned by the same ...
36
votes
5
answers
19k
views
Identifying clusters in vector point data using QGIS?
I have a vector dataset of rural broadband data-points (how fast, etc.) and I'd like to explore if there are clusters of points with similar characteristics, and to plot polygons encompassing them.
...
29
votes
1
answer
2k
views
How to calculate distance to a feature with gdal_proximity?
I'm using gdal_proximity to find the distance to the nearest major river across the USA (lower 48 states). I've projected the NHD+ network flowlines to Conus Albers (epsg:5070), selected rivers with ...
20
votes
3
answers
10k
views
Getting layer extent in PyQGIS?
I'm trying to write a processing script using grass r.neighbors algorithm for rasters. When you use the Gui for this algorithm, you can leave the GRASS layer extent field blanc to use the minimal ...
20
votes
2
answers
19k
views
Accessing QGIS processing with PyQGIS
I want to access the explode lines function in Python outside of QGIS from a standalone script.
What module do I have to load in order to use it?
How can I access processing?
from qgis.core import *
...
19
votes
3
answers
6k
views
Import error for qgis.core when running OSGeo4w shell script
I've been trying, along with this post, to run a script in OSGeo4w Shell, outside of QGIS. But I get the following error:
ImportError: No module named qgis.core
I have also read the following ...
17
votes
3
answers
9k
views
How to load memory output from QGIS processing?
Many processing algorithms have an option to save output as memory. If ran from toolbox, this works fine, because you can tick the "Open output file after running algorithm" box.
Looking at the ...
17
votes
2
answers
30k
views
Removing overlapping part of polygons using QGIS?
Here is what I'd like to achieve in QGIS.
Is there a processing tool to remove the overlapping part of polygons?
It does not matter which polygon gets clipped.
It is also very important that they do ...
15
votes
2
answers
15k
views
Getting the output layer reference returned by Processing tool
After running Processing algorithm ending up with a layer by run or runAndLoadResults in QGIS 3, these methods return a result which is mostly a dictionary like {'OUTPUT': 'file_path'} etc. So, after ...
15
votes
3
answers
3k
views
What is "Fix geometries" tool actually doing in QGIS?
Sometimes geometry's have to be fixed for further processing. So you can use "Fix geometries" and it will do the job for you without prompting. But I'm wondering, what the tool "Fix ...
14
votes
1
answer
3k
views
What is the new alglist and alghelp in QGIS 3.0 Processing?
Accessing the new QGIS 3.0 processing scripts through the Python console is proving to be a challenge for me, especially since the old processing.alglist() and processing.alghelp() commands appear to ...
14
votes
1
answer
2k
views
Why the order of imports matters in a standalone PyQGIS processing script?
I've come across a weird issue while running standalone PyQGIS processing scripts. The order of imports in the script affects its normal execution.
You can reproduce the problem by opening a Python ...
13
votes
3
answers
21k
views
Missing processing menu in QGIS
I'm sure there is a really simple explanation to this but haven't found any pointers on this forum or elsewhere. I seem to have lost the 'Processing' menu from QGIS and can't figure out how/why!?
Any ...
13
votes
2
answers
6k
views
processing.runalg() throws "TypeError: catching classes that do not inherit from BaseException is not allowed"
Hi everyone I'm in some way new with PyQGIS and I've been trying to run a script in QGIS 3.0 without success (it prefectly ran in 2.18) and always get the same error:
AttributeError: module '...
13
votes
4
answers
28k
views
Creating parallel lines at particular distance from lines which are part of a shapefile
I am using QGIS 2.18 . I have shapefile which contains multiple lines. After processing certain data processing , I need to draw parallel lines at different distances from existing lines. For example ...
13
votes
2
answers
18k
views
Why "Export as Python script" button is unaccessible in QGIS 3.0/3.1 Modeler by default?
In QGIS 3.0, "Processing Modeler" window has no "Export as Python script" button unlike QGIS 2.x.
If you look at the codes (in DlgModeler.ui and ModelerDialog.py files), you see the code lines ...
13
votes
3
answers
9k
views
Divide a complex shapefile into a grid
I have a decently detailed shapefile with polygon/multipolygon features (the file is about 500mb). It's actually a shapefile of the entire world, with the features representing coastlines. I need to ...
13
votes
3
answers
3k
views
Is it possible to use memory layers in QGIS processing algorithms?
I am building a QGIS plugin that connects to a MySQL database in the local network, and then adds a subset of one of the tables to an in-memory layer; the subset is based on data currency (only taking ...
13
votes
1
answer
10k
views
Clean way to cancel QGIS processing scripts from gui
I've written a QGIS processing script that carries out a closest facility analysis. Taking the complete input data set (20k adresses as start points, ~100 target points, OSM road network with ~13k ...
12
votes
1
answer
17k
views
Distinction between Difference and Clip tools in QGIS?
What is the primary distinction between the Difference and Clip geoprocessing tools in QGIS?
12
votes
3
answers
13k
views
QGIS 2.14 standalone GRASS provider missing Msys folder, can't execute tools
In QGIS 2.12 and down, when one went about manually setting the GRASS provider folder paths, this was the way to do it
In GIS 2.14 there is no Msys folder in the same path (...\apps\msys) or any ...
12
votes
1
answer
2k
views
Assigning shortcut to PyQGIS script in QGIS
Is it possible to assign a keyboard shortcut to a (custom or not...) script of the Processing Toolbox in QGIS?
I have not found any information about it so far.
12
votes
1
answer
6k
views
Modeling iterative processes in QGIS 3
In the QGIS version 2.X, there was an Iterative Button from the algorithm also available for the algorithm used inside the processing modeller.
Actually, I use version 3.2 and 3.4 and can not find it....
12
votes
1
answer
4k
views
Exporting Processing Modeler as Python script in QGIS 3?
How do I export my model from Processing Modeler as .py so that I can edit its code?
This does not seem as intuitive as in previous QGIS versions.
12
votes
1
answer
1k
views
Changing parameter values according to other parameter choice in Processing script using QGIS 3?
I couldn't find anything about this problem.
Suppose to have the first parameters in a Processing script defined as an Enum:
self.addParameter(
QgsProcessingParameterEnum(
...
12
votes
1
answer
472
views
Create points at specified distance from each other in random fishnet's cells while being on linestrings
We have a land protocol where we receive a fishnet of 1x1 km cells. Some cells are randomly choosed.
We need to put 4 points in each cell and these points have to be on a road too. The minimum ...
12
votes
0
answers
361
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 ...
11
votes
2
answers
5k
views
Adding ArcToolbox tool to QGIS?
I have been using a publicly available tool in ArcGIS called SPreAD-GIS. It is a series of python scripts that are "implemented as an ArcGIS toolbox" (with tbx file).
I am new to QGIS.
Is there a ...
11
votes
1
answer
6k
views
Using processing.runalg in QGIS 3
I try to create a common extent for rasters in QGIS 2.99. Here is my script:
import processing
processing.runalg("script:unifyextentandresolution",
"/qgis_data/rasters/Image2.tif;
...
11
votes
3
answers
2k
views
Creating QGIS processing script that adds sequence to unique identifier column in PostGIS
Can anybody help me to create a QGIS processing script that adds a sequence to an existing unique identifier column (type: integer) in PostGIS?
This would be quite helpful, e.g. as a workaround for ...
11
votes
1
answer
6k
views
Looking to do a one-side buffer with QGIS v2.18.9
I'm working on a project that requires a 30m buffer around a linear feature. The feature represents the coast and I need the buffer to show 30m inland from the line representing the coast. Is there a ...
11
votes
3
answers
2k
views
Summing up values of neighbouring polygons using QGIS?
I hope that you can help me with the following problem: I have a vector (polygon) layer. I would like to add an attribute to the layer that - for every polygon - sums the values of a specific field of ...
11
votes
2
answers
10k
views
Importing QGIS Processing in stand-alone python script?
I want to write a few stand-alone scripts that use the processing toolbox of Qgis.
I have read a few threads (here and here, e.g.) but couldn't find a working solution yet.
Using Qgis 2.16.1 on ...
11
votes
2
answers
1k
views
What's the batched Refactor Fields tool "field mapping" syntax in QGIS?
In QGIS, there is this nice tool "Refactor Fields" in the Processing Toolbox :
Using it on a single layer is fairly straightforward.
However, when you plan on using it in a batch mode, one can see ...
11
votes
2
answers
1k
views
How to perform repetitive tasks in QGIS?
I am trying to do a treatment on many feature files, so I would like to automate it.
In fact, I have one shapefile with the spatial distribution of some species, and one with vegetation type.
I ...
11
votes
2
answers
1k
views
Processing modeler Output Order
I have a model running on the processing framework it produces a serie of vector layers as output(alt-0, alt-1, alt-2, alt-3, and so on). I have prepared the model keeping the order of these ...
11
votes
2
answers
2k
views
Couldn't load plugin 'processing' on Windows 7 64bit
I installed QGIS (2.0.1-Dufour Dufour, d94c044) using both the stand alone installer and the OSgeo4w installer and seem to have an issue with the processing plugin. At first I thought that there was a ...
11
votes
1
answer
1k
views
r.mapcalc does not give output in QGIS
For a while now I have been trying to use r.mapcalc from the QGIS Processing Toolbox. However, the algorithm does not give me any output. I have tried several raster layers and different expressions, ...
10
votes
3
answers
6k
views
Find nearest line feature from point in QGIS
I have a line feature set and point feature set. I want to get the nearest line feature from every point. For this, the line features are converted to point using "Extract Nodes" tool. Then ...
10
votes
4
answers
1k
views
Finding closest points on another polygon
I have three layers:
polygons (having a unique id)
stops (having the polygon id it is laying on) (point)
possibilities (having the polygon id it is laying on) (point)
I now want to find the closest ...
10
votes
1
answer
6k
views
Using in-memory vector layer with QGIS processing / SEXTANTE
I'm trying to run the qgis:clip algorithm from console, but am getting an error when using an in-memory layer as the overlay parameter. Is this to be expected, or am I doing something wrong?
Code:
...
10
votes
3
answers
3k
views
Drawing boundary of set of points using QGIS?
I have a set of points which I would like to change into a polygon.
I tried concave hull but do not get the intended polygon as you can see below,
And when I use Denaulay Triangulation I need to ...
10
votes
2
answers
1k
views
QGIS 2.14.6 Processing Extension, 'Polygonize' Tool missing
Just installed QGIS 2.14.6 64Bit from OSGEO4W installer. Processing extension Version is 2.12.99. As can be seen in the screenshot, I'm not able to switch to 'Advanced Interface' as usual in order to ...
10
votes
2
answers
6k
views
Tiling GeoJSON data?
I have a GeoJSON dataset of the following format (LineString features):
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"...
10
votes
2
answers
2k
views
Will core functions in QGIS exploit multi-threading?
After reading Enabling multithreaded processing in QGIS?, I was wondering if QGIS 2.6 will include this when running various processes. I checked online and I could only find that multi-threaded ...
10
votes
2
answers
2k
views
Generating large number of maps using PyQGIS?
I have to make a large number (hundreds) of distribution maps of species.
I have a shapefile that contain the distributions for each species, and for each one, I would like to get a map as an image (...