1
vote
1answer
33 views

How to open the “File Browse” dialog in Windows from a PyQGIS plugin code?

I am in the process of developing a plugin for QGIS using Python. Note that this is my first plugin, so the query could be quite basic... I have used this Digital Geography link to create the basic ...
2
votes
1answer
46 views

Adding new Field and writing values for all features

I need to create new Field in Attribute table of vector layer, and afterwards to calculate values and store them in that Field for all features I have in that layer. I have solution which works, but ...
1
vote
2answers
49 views

Creating a plugin tutorial

I am looking for a tutorial of how to create a plugin for QGIS. I want a tutorial that: Explains about the latest version of QGIS Working in windows environment. adequate for absolute beginners and ...
3
votes
0answers
56 views

Problem with performance when loading PostGIS layer using pyQGIS

I'm having a question on loading a PostGIS layer into the project from my QGIS plugin. The code is like this: uri1 = qgis.core.QgsDataSourceURI() uri1.setConnection(str(host), str(port), ...
4
votes
1answer
71 views

How do you set the position of a plugin window when you start the plugin?

I'd like to set the position of a plugin's window or dialog relative to the map canvas frame. For example, if I start a plugin, I want it to appear somewhere in the left upper corner of the map ...
5
votes
1answer
99 views

QGIS Processing Progress

I have been developing a python plugin that uses Processing algorithm for raster calculations. I want to support the gui with progress bar. How can i connect Processing job to progress bar? I found ...
1
vote
1answer
24 views

Adding some background information to a layer

I have 2 Python Qgis plugins. The first plugin is creating a QgsVectorLayer via the ogr dataprovider. The second plugin is offering some services on the features in the layer. I need to pass some ...
1
vote
0answers
36 views

How to programmatically interrupt QGIS initialization and startup

I'm wondering how to interrupt the initialization of QGIS 2.0 on Windows XP before start up. I've put a dialog in one of my plugins that shows up on start up. However, I'd like to make a quit button ...
1
vote
1answer
54 views

Pyqgis 2.2 : How to allow editing on layer and features

I'm writing a pyqgis plugin with qgis 2.2 I succeeded in accessing and displaying vector data (geometries & attributes). Now I would like to allow editing for all my layers and all features ...
1
vote
0answers
39 views

How to write a custom map canvas item by subclassing QObject and QgsMapCanvasItem?

I'm writing a QGIS python plugin where I place some QgsVertexMarkers on the canvas like this: marker = QgsVertexMarker(self.canvas) marker.setCenter(QgsPoint(point[0],point[1])) Now i would like ...
0
votes
2answers
218 views

QGIS 2.4: plugin changes map tool canvas click behavior from 2.0

I had created a plugin for QGIS 2.0 to add new features more easily. It involves changing extents and updating snapping options along with triggering the default actionAddFeature(). However, I've ...
0
votes
0answers
48 views

gdal_translate from within pyqgis [duplicate]

I want to use gdal_translate from within a python script in my plugin qgis2leaf. I've tried with ...
1
vote
1answer
83 views

How to use the MMQGIS plugin through the Python console?

I know how to make Hub Lines using the GUI, I want to know how to do the same using the Python Console, a tutorial would be great. Thank you
1
vote
0answers
35 views

QGIS - Calling interpolation extension from python console

I would like to call the QGIS interpolation extension function (TIN method) (Raster->Interpolate) from python console. I can't find the corresponding function within QGIS API or within the ...
1
vote
1answer
88 views

Possible to run “Merge shapefiles to one” algorithm from Python script?

Developing a python script in QGIS 2.2, I can run algorithms from the Processing plugin fine such as those from QGIS geoalgorithms and SAGA. Can you do the same for the algorithm "Merge shapefiles to ...
0
votes
0answers
43 views

How to display image on the Graphics View widget in QGIS

The idea is to create a plugin in QGIS in which on mouse clicking of the layer show up a popup with Graphics View widget on it. I found this pure code: self.scene = QtGui.QGraphicsScene() ...
1
vote
1answer
97 views

Plugin of Multiple buffers in QGIS

I hope to create a plugin to do multiple buffers in QGIS. This is my script: """/*************************************************************************** izisse_test ...
0
votes
0answers
25 views

Plugin Ui interation with user and Qgis

A downsized hydrogeology plugin ( GraphicGroundwater = GGW ), instilled the need of a reduced combination of Carson's 'fTools doVectorGrid' and Pryet's 'Qgridder' plugin(s). The GGW Ui is displayed ...
0
votes
2answers
122 views

How to make a routable graph from a Point and a Line shapefile, using Networkx?

I have one shapefile which consists of all the streets in the study area, and another shapefile which has points representing origins and destinations. I would like to know if it's possible to find ...
1
vote
1answer
52 views

How to open most recent directory using PyQGIS?

For example, when I add a vector layer, next time that I want to add another layer it opens up where I chose my last layer from. How would one implement this in Python and/or PyQgis? I'm writing a ...
0
votes
0answers
17 views

Is it possible to override default QGIS error messages?

From my QGIS plugin I would like to override/replace one of the the default QGIS error message ("The layer layer_url is not a valid layer and can not be added to the map") with my own message. I have ...
1
vote
1answer
37 views

Error in LineEdit when show parsing value as string

I m trying to make QGIS plugin to open xml, parse it and then show value i parse from xml to line edit, i use this code : from PyQt4 import QtCore, QtGui from ui_testparse import Ui_testparse import ...
0
votes
2answers
165 views

How to copy attribute values of fields in selected features of one layer to another Qgis programmatically?

I am trying to get the values of attributes of the selected features of a layer field by field and copy to another layer that I created in qgis with pyqgis. Is here a example for this. Every example ...
1
vote
1answer
163 views

How to add the attributes of selected features to my new layer in pyqgis

I am trying to create a layer from the selected points coordinates. I am drawing a circle to the coordinate of selected points. I also need to add initial attributes of my selected features to my new ...
1
vote
1answer
169 views

PGRouting Layer plugin error in QGIS 2.2

I am trying to do some basic computations using the PGRouting plugin for QGIS, but I am getting this error all time: An error has occured while executing Python code: Traceback (most recent call ...
0
votes
0answers
44 views

Check if Openlayer Layer is empty, caused by nonexistence of internet connection?

I use Openlayer Google street map as a base-map in my QGIS plugin projects. i want to check programatically if the layer is loaded or is empty and decide if i load my offline base-map instead of ...
1
vote
1answer
381 views

How to create a dock widget correctly in QGIS plugin?

I am building a QGIS plugin and would like to use a dock widget. I have used QT creator to design the UI, with the object type being a QDockWidget. When the plugin is enabled in QGIS the dockwidget ...
0
votes
0answers
34 views

How to select Qgis features through Python Plugin

Hi I am very new to Python so this may be a bit basic. I am trying to find a way to select and zoom to the features in a QGIS layer. I have created a plug in and built a custom form. I have 3 ...
0
votes
1answer
35 views

Changing band for greyscale in plugin

I am trying to make a qgis plugin to change which band in a multiband data set (netCDF where the band represents time steps) is used for a grey scale rendering. The file works fine with manual ...
0
votes
1answer
67 views

Purpose of “myPlugin_dialog.py” file created by QGIS Plugin Builder

I usually use QGIS Plugin Builder to create working templates for QGIS plugins. While a generic Python plugin needs the files below; __init__.py metadata.txt resources.py (translated from ...
0
votes
1answer
171 views

visualize bounding box to a polygon

I try to make plugin in QGIS that compare 2 bounding box data, ex: (-32.61442167739459, -32.017601026186576, 13.015663782506067, 13.428145228091406) and (-38.6102467739459, -38.017601026186576, ...
1
vote
1answer
42 views

Tick boxes for a qgis plugin written in python

in a python plugin for qgis I want the user to be able to select one or more of several options via tick boxes. I imagine it to look like e.g. Qgis 2.2 tool "Vector" -> "Data Management Tools" -> ...
0
votes
0answers
70 views

QGIS Plugin to open metadata and show metadata information

I try make plugin to open and read metadata (.xml) and show information inside metadata like map scale, map fiture and bounding box and auto fill it to QLineEdit This code i use to open metadata ...
0
votes
0answers
35 views

How to programmatically add a new plugin repository in QGIS?

How can I add the name of a repository and URL to the third-party plugin repository using python in QGIS 2.01?
1
vote
1answer
45 views

How to read the count of the cells with data with non “no-data” values ,in QGis?

How to read the count of the cells with data with non "no-data" values ,in QGis
0
votes
0answers
53 views

QGIS 2.0.1: Changing layer properties with python console

I'm working on a plugin that will aim to ensure that the following steps either "transparent" to the user with one click :   Creating a table with predefined fields Record in this table in postgis, ...
1
vote
1answer
116 views

How to remove all selection from all registered layers using QGIS plugin?

I want to remove all selection from registered layer in QGIS using Python. I tried to clear the map canvas using: self.iface.mapCanvas().clear() self.iface.mapCanvas().refresh() but the ...
2
votes
1answer
101 views

How can I delete a shapefile using OGR?

In my QGIS Python plugin, I use shapefile layers and I am having a problem rewriting existing shapefiles. Is it possible to delete a shapefile from disk using OGR?
0
votes
1answer
87 views

Plugin QGIS Error “QTextEdit.setPlainText(QString): not enough arguments”

I try to make save as button but i got this error message when try to save file in my directory File "C:\Users\Mr.Pakde/.qgis2/python/plugins\condition\conditiondialog.py", line 80, in saveAs ...
5
votes
1answer
106 views

How can I get the field index of the new layer in my script using Python?

I am trying to use layer.changeAttributeValue(fid, fieldIndex, value) to add values to a field in QGIS Basically, I'm creating a plugin which will, if a checkbox is ticked, create a new field, then ...
0
votes
1answer
76 views

How can i stop rendering Qgis

In my python plugin ,i select features from a vector layer dynamically using a loop and executing : VectorLayer.select(feature.id()) when i start the loop, the selection become very slow because ...
1
vote
2answers
421 views

Programmatically load composer from template and generate atlas using pyQgis

I Am trying to build a plugin to load a print composer from file, generate an atlas and export to image. So far I have been successful in loading the template and exporting it to image. I have been ...
2
votes
1answer
150 views

How to join USDA SSURGO soil table data to features in QGIS?

I am trying to make a soil map using QGIS. The only problem is that I cannot join table data to features in QGIS. In ArcGIS for Desktop you just open the folder and then join the tabular table ...
9
votes
1answer
506 views

Import GRASS and SAGA modules to python script

I'm new at this. I am "building" a python plugin for qgis and I want to import modules from GRASS and SAGA but I don't understand how to do it. The plugin I want to import is Kriging interpolation ...
4
votes
0answers
55 views

Using QGIS plugins from Python [duplicate]

Is there a simple way to automate calls to QGIS plugins from a QGIS Python script? Either from console or a plugin? I am ideally looking for a way to specify input/output parameters and bypass GUI. ...
0
votes
1answer
100 views

How identify Layer name when removing it from legendInterface qgis?

I am trying to connect the removing layer action with a slot for doing some processing after that. I already try this: QObject.connect(self.iface.legendInterface(), ...
0
votes
0answers
75 views

QGIS2.0 plugin with freeglut

Has anyone been successful in using QGIS 2.0 plugin which uses freeglut? I have tried all of the below to import freeglut but none of the freeglut functions are recogonized in my plugin. import ...
2
votes
1answer
1k views

PyQgis question: How to change or set active layer?

Developing a qgis plugin, I found that if no layer is selected in the Layers panel I can iterate over all layers and do anything to them, but "activate" them. Could someone give me a hint please? ...
1
vote
0answers
44 views

Qgis 1.9 commitChanges() and Redraw a temporary layer

Using QGIS 1.9 and writing a python plugin. I have a function that connects points into polylines and draws them as a temporary, in memory layer. Membership in a polyline is determined by a field in ...
0
votes
0answers
211 views

How to integrate .NET application in QGIS using Python?

In our company we have developed a .NET application that's now integrated with 3 different GIS platforms. Now we would like to make it work with QGIS but we need some help on getting started. I've ...