1
vote
1answer
21 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
19 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
0answers
43 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
53 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
0
votes
0answers
22 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 ...
0
votes
1answer
59 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
33 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
76 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
18 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
109 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
42 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
16 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
30 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
104 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
112 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
135 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
42 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
261 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
27 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
33 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
63 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
111 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
40 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
54 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
31 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
40 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
49 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
83 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
86 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
69 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
92 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
71 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
314 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
131 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
436 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
53 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
84 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? ...
0
votes
0answers
67 views

How to set option that opens results of identification tool in form using python in QGIS plugin?

I would like to set "Open a feature form, if a single feature is indetified" when I run my python QGIS plugin? Is it possible? I am developing plugin for users without GIS and QGIS experience. I ...
1
vote
0answers
38 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
173 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 ...
0
votes
0answers
66 views

How to add a group at the top of all groups in a legend?

I have six groups of layers added to the legend. After adding the new one using python, I can load layers then move them to this new group. Is it possible to create group at the top of all groups or ...
2
votes
1answer
86 views

How to set default bad layers handler in the python plugin?

I am trying to write a python plugin for QGis. My python plugin will copy a template qgis project into data catalog with ESRI shapefiles. Because data catalogs can vary in its content there will be ...
5
votes
1answer
362 views

How to programmatically associate a layer with a custom UI?

I know it is possible to associate a layer with a custom UI for editing feature attributes using the QGIS interface. But is this possible with Python? This link shows how to achieve the result ...
0
votes
0answers
65 views

How to export png to file system with python?

I use python to make a plugin that contains shape file,color_bar,time_bar 3 items above now I want to export my result to a png image After I find the method to do it I find a similar way to ...
1
vote
0answers
249 views

Install shapely for QGIS on Mac

I know there are a number of similar questions, but none of them have answers that allow me to use shapely in QGIS. In particular I am trying to install the Contour plugin, but this fails with the ...
2
votes
0answers
85 views

Rounding error in qgis point sampling tool

I'm not sure if this is a bug or of it is due to the implementation. I am using a raster that has values greater than 1,000,000 and Qgis displays these numbers in a scientific notation. For instance, ...
0
votes
1answer
141 views

How to access the button on the form?

I have a form that appears when you start the plugin.How do I properly apply to the button on the form, so that when you click on the button performed "function". import sys,os import win32api from ...
0
votes
1answer
292 views

Check if layer is a QGSVectorLayer from Python Plugin within QGIS

I am trying to extend some concepts in the QGIS Workshop tutorial. Basically, I would like to check if the layer is of type "QGSVectorLayer". In the QGIS Python console, I am able to type canvas = ...