Quantcast
Channel: Question and Answer » pyqgis
Browsing latest articles
Browse All 64 View Live

Adding PostGIS layer from QGIS Python plugin

I try to develop a plugin to add postgis layers to qgis from a plugin as part of learning python. The code for adding a postgis layer is taken from the cookbook and work fine if I run it from the...

View Article


Why do I get different results from PyQGIS feature.geometry().type()?

On the python console in QGIS what is the difference between the following two code snippets (activeLayer is a polygon layer): # 1) iface.activeLayer().selectedFeatures()[0].geometry().type()...

View Article


How to set conditional imports for a PyQGis script running inner or outer of...

Related to Cannot run standalone QGIS script I try to detect if my script is run from a QGIS instance (through the plugin) or from a standard python console. This detection will enable conditional...

View Article

PyGIS remove QgisVertexMarker from scene

I am writing a plugin that includes interaction with the map. Therefore I use a QgsMapTool. It is possible for a user to mark a point on the map. When the user clicks a red X is drawn on the mapCanvas...

View Article

Do I have to publish own QGIS plugins?

If I develop QGIS plugins for my company do I have to make them available to others? I use QT-Designer and think that it also depends on the question how you develop your plugins, right? For example:...

View Article


Updating feature attribute in QGIS plugin?

I am writing a plugin for QGIS (v2.12). There have been quite a few similar questions on this forum, but they don’t seem to work for me. my plugin does the following: get the vector layer check that it...

View Article

Image may be NSFW.
Clik here to view.

Label layout on python in QGIS

Now the only issue is that in image I am not getting the labels, I have on polygon. Please help in that too Please see above attached screenshots here I need labels – I have updated QGIS it’s version...

View Article

Troubles Updating Values of Selected Features with PyQGIS

I’m trying to modify the values of some selected features. I have written this small script, but nothing happens when I run it. Is there something that I’ve missed? Here is my code. lyr =...

View Article


Python script to automate saving satellite images for different combinations...

PS. : This is my first try at a GIS application. Please forgive if my question is pedantic. I would like to get a series of satellite images all at the same scale centered around different points on...

View Article


module object has no attribute classFactory

I asked this question several days ago on the QGIS developer list but didn’t get any love. I’m hoping someone can help me resolve this error. I have a custom repo and a custom plugin that I’m...

View Article
Browsing latest articles
Browse All 64 View Live