Linked Questions

7 votes
2 answers

AttributeError when counting entity number using PyQGIS

I'm trying to count the number of entities but each time I have this error: `AttributeError: 'dict' object has no attribute 'featureCount' while I have only one selected layer uri = r"C:\...
patrickblancseau's user avatar
5 votes
2 answers

Making dissolve output as temporary layer using PyQGIS

I want to dissolve my layer by using this script and it is successful, however I want my dissolved layer to be temporary, and my input as any active layer. Can someone help me? from qgis import ...
PyCher's user avatar
  • 171
4 votes
1 answer

Automating the selection of starting points in calculation of Shortest path (point to layer) in QGIS

For a letter drop experiment in Germany, I am using QGIS Network Analysis tools to calculate the shortest distances from letter drop points to surrounding postboxes. Using the "Shortest path (...
Melike Kaplan's user avatar
6 votes
2 answers

Renaming the result of QGIS Processing Algorithm

When calling a QgsAlgorithm from within another, the result will be named after this algorithm output regardless of what is setup as the output of the main one. For instance, taking the code from the ...
YeO's user avatar
  • 599
4 votes
2 answers

Dynamically naming the resulting temporary layers from the PyQGIS script

I am reprojecting a list of files using a for loop Piece of code: projection ='native:reprojectlayer', {'INPUT' : inputfile, 'OUTPUT' : 'memory:', 'TARGET_CRS' : ...
israr ahmed's user avatar
2 votes
2 answers

Merging a generated polygon to an existing layer using PyQGIS [closed]

I make points everyday and make it into a polygon and merge it to the previous polygon I have already made The format of the points are in yyyy-mm-dd_Points and the polygon format is ...
charliey's user avatar
  • 163
4 votes
1 answer

Making Voronoi polygons using Python Console of QGIS

I am using QGIS 2.6.1-Brighton. Can you find errors in my attempt to make Voronoi polygons using Python Console and suggest improvements? I have tried the following scripts but got the errors. output=...
Karan Gupta's user avatar
3 votes
1 answer

QGIS processing algorithm - add saved geopackage layer to map

I am still new to Qgis and Python and most likely this is really simple but however I do not manage to do the following: I am trying to write a python processing algorithm for the processing toolbox. ...
SHeld's user avatar
  • 51
3 votes
1 answer

How to use 'memory:name' output as VectorLayer in PyQGIS?

After running processins in a loop, I try to export results on a single shapefile. I've created a vector layer called "regroupee", I merge results with it, and I overwrite "regroupee" with the result....
Zacharie Moulin's user avatar
4 votes
1 answer

Is it possible to get the the layer returned by a GRASS tool without saving it to disk in QGIS?

I use some GRASS tools in QGIS Python Console. All tools I use return a dictionary with a key and a value which contains string path, like this: {"output": "file/path"}. There is ...
Noura's user avatar
  • 3,429