I have a couple of raster files and I need to create attribute tables for them in QGIS using PyQGIS. I have tried raster attribute table plugin but how can I do it from the Python console?
I'm working with QgsSymbolLayer and I want to set the stroke color to an expression (@symbol_color) but I can't seem to figure it out. And the documentation doesn't talk about using expressions for it. I basically want to do what is in the photo…
I am writing a script in pyqgis which should perform the following task:
First it should read a csv file which we consider it as a input csv,csv file will be something like this:
layer ,columnname ,condition ,values
layer1…
I have been for months trying unsuccesfully to make a function which can compare a feature with the other ones in a shp layer and if some conditions fulfill, the feature in the loop is deleted. I need it for my final work. The conditions to delete a…
I'm trying to react on a QGIS build-in function by attaching an event-listener of some sort. Unfortunalely, my reserch didn't give me any possible approach. So I have no code to show.
So my question is pretty general. I know qgis has an event…
Good morning, I'm new to pyqgis.
I'm trying to create a new field in my attribute table but it's not working if someone can help me I appreciate it
follow the code:
# Calculadora de campo
alg_params = {
'FIELD_LENGTH': 0,
…
I have a main dialog which displays information, and it also has a edit data button. When the edit data button is clicked a new dialog appears where you can edit and change and data and press OK to save it into the txt file that stores the data. I'm…
I'm working on creating python plugin that implements image viewer and use layout to plased elements in correct plases. I want to resize all elements in dialog window of this plugin using resizeEvent of QDialog, but I have one strange problem: when…
I am trying to use the method writeRaster from qgis.core.writeRaster to create a singleBand raster of float and Nans but according to the documentation, I need to provide theses inputs:
writeRaster(
self, # OK
pipe: QgsRasterPipe, # Q1
…
While I developed QGIS plugin, I get some problem with promoting class in Qt Designer.
I create plugin, using Plugin Builder and after that I reorganize the structure to this:
Structure
So now, when I promote a ComboBox in Qt Designer to my combobox…
I have a pyqgis script done in QGIS 2.18 which basically open a QGIS3 project with around 9 layers.
There is a lag until these layer are displayed on the canvas so I put a QMessageBox to display a waiting message for the user.
This is the…
Ive downloaded QGIS 3.22
according to documentation, I need to set PYTHONPANTH and PATH to make pyqgis visible from python for a stand alone application:
set PYTHONPATH=c:\python
such folder doesnt exist. Specificly c:\program files\qgis…
I want to take a custom function for QGIS made in python and use it in a python script. The function came from this answer https://gis.stackexchange.com/questions/245146/getting-quantity-of-intersecting-lines-of-polygons-in-qgis and I updated it to…
I am nooby to Plugin Development but I'm trying to create a plugin in QGIS, for a Uni-subject, with its own graphical interface, which will receive a zipcode from the user and return the name of the corresponding location.
I already created the…