Skip to main content
7 votes
Accepted

Using QgsProcessingParameterEnum in QGIS Python processing script

Set usesStaticStrings=True when you create the parameter: class ExampleProcessingAlgorithm(QgsProcessingAlgorithm): # etc... def initAlgorithm(self, config=None): self.addParameter( ...
user2856's user avatar
  • 66.5k
4 votes

Why is it slow when deleting features in gpkg using PyQGIS?

I haven't tested it, but as a Geopackage is actually an sqlite file, you could try executing the delete statement directly as SQL statement on the Geopackage. Something like this: from osgeo ...
Pieter's user avatar
  • 2,749
3 votes
Accepted

"Could not load source layer for INPUT: memory: not found" error in Processing Script using PyQGIS

The error occurs because the intermediate results stored in memory are not being handled properly. QGIS sometimes has trouble managing layers in memory between processing steps. To fix this, you can ...
Nil's user avatar
  • 1,572
1 vote
Accepted

GRASS r.viewshed not working with elevation? - PyQGIS

The maximum distance is computed as a 2D distance, elevation is not taken into account.
Anna's user avatar
  • 901

Only top scored, non community-wiki answers of a minimum length are eligible