Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by QgsProcessing Exception
attributes table does not reflects changes with script opened from file or added to the toolbox
I'm using QGIS 3.44.9. I'm trying to build a script that adds a layer to my project at the end. But I'm troubled with script behavior depending on wether it's executed with the open existing script or with the add script to toolbox option.
Empty @layer_name variable in QGIS expression using the "Geometry by expression" tool
This is a bug (#54869) with no workaround other than hardcoding the layer. An alternative to using the native (C++) Geometry By Expression tool is to modify the old python Geometry By Expression tool from QGIS 3.10 and add the missing layer scope to the expression context using QgsExpressionContextUtils.layerScope.
PyQgis: Processing algorithm load output raster
I am writing a standalone processing algorithm with pyqgis. The intention of the script is to create an offline basemap that is created only within the extents of objects of one layer. Therefore I am using the native:rasterize tool in a for loop to create the list rasters of temporary rasters. This list is eventually used in gdal:merge to be merged together to one raster. The script runs smoothly until the final step of loading the final raster back to the QGIS project or save it.
Issue with custom QGIS process algorithm
I have a written a custom processing algorithm which iterates features within one vector layer and eliminates polygons of the second that are within each feature from the first under a specific size.
PyQGIS Processing Script Template - Bugs im Code
Based on the QGIS Processing API template I am trying to write a test script that calculates geodesic distances between point geometries using qgis:distancematrix. User selects the from- and to-point layer with the corresponding ID attribute fields, the matrix type and the output location via GUI analogous to the mentioned QGIS processing tool.
"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.
QGIS Script - Fundamental questions about creating layers
I'm searching all around how to create a new layer on a QGIS Script (that you can add to the tool bar). I see many things that don't work, or work partially, and I can't figure out what types and values are expected. So, regarding the following code where I try to create a new layer from scratch, how can I make it add the layer to the map?
QGIS Script - How to add results to map?
I followed the instructions in https://docs.qgis.org/3.34/en/docs/user_manual/processing/scripts.html to create my own script (the code below is a test code, not the full code, please don't focus on "what" it's doing) The script runs without errors, the log says its outputting correctly, but the output never goes to the map. How can I make the results appear in the map? Is there anything missing in my code?
QgsProcessingAlgorithm.initAlgorithm() is abstract and must be overridden
If i create a processing script from the template provided, i get this error (that is spammed every time i open qgis) I couldn't figure out a way to get rid of it (despite the error, the scripts I've generated starting from this template works) Any idea?
Message Bar called from a script shows in its own little window?
I'm trying to show a message bar in the main window, reporting on the result of a processing script. However, an empty message bar appears in the main window, and the text appears in a small little separate window, as below: With a different message level (Warning) the blank message bar and the new window change their colour and icon accordingly: But I prefer a normal message bar, all in one piece/place. Anyone know what is missing here?
Correct way to specify Inputs and Outputs for QGIS processing scripts that use custom widgets?
Processing scripts do not allow parameter inputs to be changed by other parameter inputs. This can be overcome by defining a custom widget which does have the desired interactions, then using a 'widget_wrapper' to add the custom widget to the processing parameter inputs.
Runnig the PyQGIS script without opening the project in the GUI
Asked today Viewed 7 times I have a successful Python code that runs in the QGIS Python Console when a project is open to calculate the shortest path between hundreds of points. I now want to run the code across lots of projects without actually opening them in the GUI, but still using the QGIS Python Console. My code runs but it fails to calculate the shortest path. Do I need to amend or change the code to ensure it runs without opening the project in the GUI? Below are some key parts of the code.
How to Add a Feature class from a Geodatabase to Qgis using Pyqgis
Asked today Viewed 3 times Banging my head against the wall on this one: I've tried this method: (Adding feature class within file geodatabase in QGIS with Python?) uri = "C:/Temp/my.gdb|layername=fcName" layer = QgsVectorLayer(uri, "layer_name_you_like", "ogr") QgsProject.instance().addMapLayer(layer) and adding it as a default value: self.addParameter( QgsProcessingParameterFeatureSource( self.INPUT, self.tr('Input layer'), [QgsProcessing.TypeVectorPolygon],...
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with QgsProcessing
Contact QgsProcessing, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack