0
votes
1answer
29 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
22 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 ...
0
votes
0answers
16 views

insertVertex giving false in pyQGIS

I have this code from my plugin which work in Qgis 1.8 and I am trying to make it work in 2.0. I want to insert a coordinate x and y into a polyline after the last entry. points = geom.asPolyline() ...
0
votes
0answers
4 views

Query from plugin that shows result on Map and in Attribute Table

I'd like to create a plugin that performs a static (no user input required) query that, based on a condition, selects all the features on the map and displays these in the attribute table. I have the ...
0
votes
1answer
35 views

Replacement of QVariant and setAttributeMap in PyQGIS

I am updating a plugin for QGIS 1.8 to QGIS 2.x. I have the code below. The setAttributeMap does not exist anymore. I have replaced it with fet.setAttributes and it seems to work. When using ...
1
vote
2answers
128 views

How to set Eclipse and PyDev for QGIS when ArcGIS is installed?

I have got a lot problems with the configuration of Eclipse with PyDev in order to develop QGIS plugins. The situation is very weird and frustrating. I can import qgis module using Pyscripter without ...
0
votes
0answers
23 views

QGIS plugin, extending plugin stub, instance has no attribute error

Update This is not an answer to why it does not work when the method is defined inside the class, but a workaround. Simply defining the method outside, prior to, the class (something that Evil ...
0
votes
1answer
57 views

AttributeError: 'module' object has no attribute 'Open'

Hy, I am running the following code which I found on: GDAL - Perform Simple Least Cost Path Analysis which I adapted to my case, but I get the following error when running the code in the python ...
0
votes
1answer
17 views

how to compile qgis-1.8.0 on ubuntu

i have downloaded qgis-1.8.0.tar.bz2 and I want to install it on my linux computer(12.04 LTS). How can I perform it please? I do it because I am desperate with Qgis 2.0.1 Dufour on ubuntu 12.04, ...
1
vote
2answers
70 views

How to get the file paths of the loaded layers in a QGIS plugin?

I am very new to GIS, QGIS and Python so please bear with me. I am using QGIS 2.0 and I would like to develop a QGIS plugin that would display the raster layers of the main window in order to allow ...
0
votes
1answer
40 views

Halt QGIS on startup

I have a custom made login form in Python, which launches on QGIS startup. But before the user has a chance to enter the credentials, the program starts normally, bypassing the form. From then on the ...
1
vote
1answer
24 views

How to randomly select from existing points within each polygon?

I have a polygon layer (where each feature has a class attribute), and a point layer, and there are at least 10 points within each feature of the polygon. Is there a way to randomly select only "k" ...
1
vote
1answer
126 views

QGis 2.0.1 mapserver extension missing

I tried to export my Qgis projects to mapserver, using RT mapserver extension, because there is not any other extension in my version of QGis.(QGis 2.0.1 Dufour on ubuntu 12.04 LTS). After installing ...
2
votes
1answer
77 views

QGIS 2.0 Plugin: Select and Identify a Single Feature

given is a layer with some nodes on it and every node has some attributes(name, id, etc...). For showing up the informations of a single node I can use the "Identify Feature Tool". Choose the tool, ...
2
votes
1answer
109 views

Why does writing large shapefiles crash QGIS?

I'm trying to write large shapefiles with QGIS 2.0 API, using Python, which crashes QGIS. The data is composed of simple two point lines and a data table of five columns. A thousand features or so ...
3
votes
1answer
33 views

How to store the CHANGES to a map database

I'm looking into providing a map amendment service for a particular map series. The service will help map owners look into the changes made to the operational features of the map, after the map was ...
0
votes
0answers
72 views

Display plugin icon

I'm unable to setup the display of the toolbar icon for a plugin in QGIS 2.0. I have compiled the "resources.qrc" with the correct path and filename, and checked possible spelling errors in the code. ...
1
vote
0answers
59 views

How can I change the NoData value in QGIS 2.x using the python console

I'm trying to add a NoData value to a single band raster image in QGIS 2.0 using the python console but can't find the right bit of code to do it. Here's what I see on the console: >>> ...
1
vote
2answers
170 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 ...
4
votes
2answers
239 views

How do I set layer transparency in QGIS 2.0 with Python?

I have a raster layer loaded in QGIS and I'd like to be able to set its transparency via the Python console. I'm new to the API and have not been able to find out how to do this. Any help would be ...
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. ...
1
vote
1answer
664 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
48 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 ...
0
votes
0answers
198 views

Problem compiling UI file generated by QGIS Plugin Buidler

I have used the plugin builder QGIS 1.8 to create an empty plugin. The next step is to compile the ui file using pyuic. pyuic.py runs but halts at the line with from PYQt4 import QTCore and an error ...
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 ...
1
vote
1answer
72 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
230 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 ...
2
votes
1answer
121 views

How to get mean of pixel values within a buffer zone around current mouse position in QGIS

for a qgis 1.8 python plugin I want to query the mean of all pixel values of a raster layer within a defined buffer around the current mouse position, not for an existing point layer. For the buffer ...
2
votes
3answers
419 views

How to add QGIS Python API Intellisense support in Aptana Studio3/Pydev

I'm developing QGIS plugins using PyDev in Aptana Studio 3 and I would like to know if it's possible to make it aware of the QGIS API and add some "intellisense" functionnalities when programming. For ...
0
votes
2answers
297 views

How to display data from a feature?

I want to display data based on the feature currently selected/clicked on. I am following a tutorial from http://www.qgisworkshop.org/html/workshop/plugins_tutorial.html. It initially shows you how ...
0
votes
1answer
124 views

How to use expression in QgsVectorlayer label by using python?

how to show the two field values as a label on features. I have done it for a field called "ErrorDescr" with this i need to show another field values. Other field is "MarkerId" ...
5
votes
1answer
909 views

How can I programatically create and add features to a memory layer in QGIS 1.9?

I had a working plugin in QGIS 1.8 which read data from an MSAccess database and added it to a series of memory layers. There is some processing involved in the interim so I don't think simply using ...
1
vote
1answer
149 views

open QGIS project with parameters

I am looking at a piece of work to deploy QGIS as the standard within an organisation. There is an existing piece of software that I need to link to QGIS so that when a button is pressed within the ...
3
votes
1answer
121 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 ...
2
votes
1answer
245 views

Python Script that calls the Voronoi Polygons Function?

I've been looking to see if there was a way to call Voronoi Polygons function found in Vector/Geometry Tools, directly from the code but I have not found one. Does this currently exist? Is there a way ...
0
votes
2answers
135 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: ...
1
vote
1answer
203 views

How to get vector feature by mouse location?

I'm writing a photo grouping plugin. My current problem can be broken up into "end goal" and "baby steps", because I think that's what I want. But if there's a way to get to the end by a different ...
4
votes
4answers
306 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
76 views

How do you Select an existing vector Layer and Edit it, using python?

I'm developing a small plugin that needs to be able to select a vector layer programatically based on what layer the user has selected. However I'm not sure how to do so. I believe I found the two ...
2
votes
1answer
350 views

Handle add new feature event and/or access feature before commit?

Is it possible with PyQGIS to catch "add new feature" event before commiting changes on the layer? or at least to access new features before commit.
1
vote
1answer
122 views

Get feature while editing

I have created my custom form for features editing, using layer.setEditForm("form.ui") and layer.setEditFormInit("init") properties. init method receives dialog, layerId and featId as arguments. ...
1
vote
1answer
83 views

Raster menu does not have any tools in QGIS

in raster menu in QGIS, only raster calculator is available, how to get other tools, like wrap (reproject) please see the image for help. help me to get this.
1
vote
1answer
353 views

Why do I get 'KeyError: 0' when using Line Intersection tool?

I'm using Quantum GIS version 1.8.0-Lisboa and trying to create intersection point using Intersection tool. (Vector -> Analysis tools -> Line Intersections ) But when I do that for my shapefile, It ...
6
votes
1answer
1k views

How do I maintain a resposive GUI using QThread with PyQGIS

I have been developing some batch processing tools as python plugins for QGIS 1.8. I have found that while my tools are running the GUI becomes non-responsive. The general wisdom is that the work ...
5
votes
1answer
651 views

How to transform a selected multipart feature into singlepart features while editing in QGIS?

There are several questions and respective answers for how to make a multipart features Layer into a singlepart features one using QGIS: How to break a single polygon into multiple polys? How to ...
3
votes
1answer
119 views

Button to add a new line in a non-spatial table without opening the table itself using QGIS?

While using QGIS and having loaded a non spatial table (from PostGIS), is it possible to add a new row to its table attributes without having to open the attribute table first as in here Is it ...
4
votes
1answer
111 views

Can I add entries to the layerlist context menu?

I am implementing a python based plugin for use with QGIS 1.8. Most of it's user interface is contained within a QDockWidget but there are some layer specific controls I would like to append to the ...
1
vote
2answers
1k views

How to fix QGIS PyQGIS package?

I have a broken package that is preventing QGIS from loading python plugins, updating itself, or even un-installing. The main symptom of this problem is the following message that appears when QGIS ...
2
votes
1answer
418 views

How to debug 'Layer is not valid error' from Python plugin?

I'm trying to understand what goes wrong with a QGIS python plugin. Basically I'm trying to render a series of POINT. The query works fine, at least giving it by hand from inside PostGIS DB: "SELECT ...
2
votes
1answer
1k views

TIN Interpolation using a vector layer

I'm writing a plugin in QGIS and I'd like to generate a TIN surface using a vector layer with x,y and z (interpolation attribute). The idea is to visualize the same result like in the Interpolation ...