0
votes
0answers
8 views

Pyqgis :2.2 : link between a signal and an event

I'm writing a pyqgis 2.2 plugin with qgis 2.2 I succeeded in accessing and displaying vector data (geometries & attributes). I succeed also to create a 'beforecomitechanges' signal ( emitted, ...
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
27 views

Modifying properties of Attributes Table in QGIS?

In my QGIS project I'm using vector layers that require a lot of data inputting/editing. The problem is that some of the data I'm inputting varies greatly in matter of length and structure (various ...
1
vote
1answer
25 views

What causes this error when loading plugin

After installing pyspatialite on my Mac two plugins fail to load with this error:: This plugin is broken invalid literal for int() with base 10: '2-spatialite' I am fairly sure that the offending ...
1
vote
1answer
34 views

How to interact with other layers in a QGis Python init function?

I am using QGis and making a Python script that sets the Python Init function to a custom UI file. I have a function with the following signature: def formOpen(dialog, layer, feature): ... I ...
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 ...
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
0answers
36 views

Couldn't load PyQGIS in QGIS 2.2 on Ubuntu 14.04 [duplicate]

This issue appears to be occurring with some frequency to folks in some shape or form. I upgraded from ubuntu 12.04 to 14.04, with loss of python functionality. My QGIS version is 2.2 from the ...
0
votes
1answer
33 views

QGIS API documentation in French?

I am looking for a document which explains what the API of QGIS is, with examples of this API but in French.
0
votes
0answers
21 views

Is it possible to customize openFeatureForm of pyqgis?

I am a beginner in PyQgis. I am trying create a plugin, which will be used to AddFeatue,Delete Feature, and Edit the Feature. It is more customized than which is provided by Qgis (2.2). I am capturing ...
0
votes
0answers
10 views

search for examples of plugin of Multiple buffers [duplicate]

I am loooking for examples of plugin for Multiple buffers to help me to create a new one .
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 ...
0
votes
1answer
54 views

Developing QGIS plugin on Mac - GDAL

I'm developing a plugin for QGIS called DEMtools. It runs fine on my linux machine, but is causing me headaches when run on Mac OS X Mavericks (surprise, surprise). I keep getting segmentation faults ...
0
votes
1answer
28 views

Errors uploading plugin to QGIS python plugin repository

I'm trying to upload my first plugin to: http://plugins.qgis.org/plugins/add/ I keep getting the following error: There were errors reading plugin package (please check also your plugin's ...
1
vote
1answer
43 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
107 views

models from QGIS 2.0.2 to Python scripts?

I want to automate some tools for QGIS 2.0.2 using Python. Previously I have used ArcMap for automating tools and now i want to use QGIS. In ArcMap I used the ModelBuilder, and more specifically the ...
1
vote
1answer
99 views

How to use Threads in PyQgis, mainly to keep UI active?

I'm trying to develop a plugin, which does heavy computations and as a result, user interface becomes inactive. I know that I should use threads to keep the UI alive (specifically, I have a progress ...
1
vote
1answer
99 views

How can i use python QGis network analysis library to calculate short path based on speed and distance?

I want to calculate and show short path from starting point to an end point in a qgis python plugin. in my research i stopped by an article about QGis network analysis library; ...
1
vote
0answers
38 views

How to include external libraries with my QGIS plugin?

I'm developing a plugin which makes use of "networkx" library extensively. However, networkx is not part of Python libraries pre-installed in QGIS. Is there a way to include this library with my ...
1
vote
0answers
49 views

Programmatically modify layer datasource on project save event (QGIS)

I have a QGIS plugin which allows users to add WFS/WMS layers to the map. I would like to be able to scramble the user ID part (token) of the uri when the project is saved/closed and then use my own ...
2
votes
0answers
63 views

Programmatically change layer position in the table of contents (QGIS)

I am trying move/position a layer to the bottom of the TOC by using addTopLevelItem on all other layers. I unsure how to reference the layers as QTreeWidgetItem's. def bg_bottom_level_item(self): ...
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 ...
0
votes
0answers
42 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
14 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
108 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
274 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
33 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
306 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
26 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
140 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
54 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
35 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
372 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
136 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
129 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
39 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 ...
1
vote
0answers
99 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
66 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
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 ...
4
votes
2answers
322 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 ...
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. ...
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 ...
0
votes
0answers
284 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
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 ...
2
votes
1answer
142 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 ...