0
votes
1answer
40 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 ...
0
votes
0answers
28 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
26 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
26 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
59 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
19 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
26 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
49 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
40 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
33 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
36 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
24 views

How to add programmatically new plugins repository in QGIS?

Is it possible to add name of repository and URL to the third part plugins repository using python in QGIS 2.01?
1
vote
1answer
28 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
39 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
48 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
70 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
38 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
70 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
64 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
183 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
94 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 ...
8
votes
1answer
312 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 ...
5
votes
0answers
48 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
61 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
74 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
688 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
49 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
33 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
122 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
57 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
77 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 ...
3
votes
1answer
234 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
58 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
221 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
78 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
126 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
206 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 = ...
0
votes
1answer
176 views

How can I avoid UnicodeEncodeError when using geoprocessing tools in QGIS?

I have a shapefile, that I want to split with the "Split Layers by Field"-tool. Due to some umlauts (ä,ü,ö) there will be a python error as soon, as the tool reaches a feature with an umlaut. The ...
4
votes
1answer
314 views

How to access the road graph plugin in python?

I am developing a few scripts in Python for QGIS 1.8 to automate some geo-tasks and one of them would be to calculate the shortest distance from a hospital to each building in a town. I would like to ...
5
votes
1answer
504 views

How to create a dropdown menu in QGIS Toolbar with Python

I Have a set of some QAction in my QGIS-Plugin and they are created and added to the toolbar like this icon = QIcon(":/action1.png") self.action1 = QAction(icon, u"Action 1", self.iface.mainWindow()) ...
3
votes
1answer
124 views

How to see print commands through Python Script while programming plugin for QGIS?

This might sound like a silly question. Is there a way that from running a custom plugin made for QGIS that a Python Shell can appear along when the plugin is run, like a debug screen. I'm asking ...
1
vote
1answer
81 views

How to reopen a plugin-window in QGIS?

I am currently taking my first steps in playing around with programming a plugin in python 2.7 for QGIS 1.8. While my plugin does what it should, I would like to make it more userfriendly. At the ...
1
vote
2answers
137 views

How to handle adding a PostGIS layer in pyQgis without saving password?

I'm writing python plugin and trying to find the right way to add PostGIS layer on the map without storing user password. After adding layer on the map, I strip out the password from uri like this: ...
0
votes
1answer
86 views

What could I do to make QGIS find all the plugins?

I'm starting to use Ubuntu 12.10 and would like to get my QGIS running on it. Installation was fine but when I tried to add a package called Points to Paths the Plugin Manager was unabled to find it. ...
4
votes
4answers
310 views

How to display a “Save As” dialog for raster files?

I'm writing a QGIS plugin in python. I need to show a "Save as" dialog window in order to allow the user to select the path of the output raster file. Do I need to create a QFileDialog and manually ...
1
vote
1answer
271 views

Rpy2 Unable to Load in Fresh QGIS Install

after installing qgis the a message given below is shown Unable to load the plugin: Unable to load required package rpy2. Please ensure that both R, and the corresponding version of Rpy2 are ...
0
votes
1answer
228 views

How to properly add a Python Module to a Plugin?

I've been trying to use a module that is installed in my local version of python, but whenever I open the plugin itself, it does not manage to locate said module. The module in this case is Noise ...
1
vote
1answer
87 views

How to use QgsVertexMarker in a python plugin?

I am trying to display a vertex marker for a QGIS python plugin I am writing. I am getting a the following error... 'NameError: global name 'QgsVertexMarker' is not defined' canv = ...
1
vote
1answer
236 views

Cannot install TimeManager 0.7: no module named six

I was able to extract and copy dateutil to C:\OSGeo4W\apps\qgis\python\dateutil and the error saying that dateutil wasn't found disappeared. But now I am getting the error no module named six. Tried ...
1
vote
0answers
154 views

How to handle mmqgis geocoding IOError: [Errno socket error] [Errno 101]?

I try to geocode a .csv file with QGIS + mmqgis plugin. But, since some days the plugin always crashes. I tried it with QGIS 1.8.0 on an Ubuntu 11.10, OSGeo-Live v6.0 (which is Xubuntu 12.04.2 LTS) ...