0
votes
1answer
29 views

Displaying QGIS layer after loading with Python

I'm successfully loading several layers with Python, but can only get to see them in the map window if I manually zoom to extent afterwards. Once the last layer is loaded I call zoom to extent in the ...
0
votes
1answer
78 views

Code works on python console in QGIS but same doesn't work in stand alone script

I'm trying map rendering with stand alone script, so I have small script which works fine in python console provided QGIS, however when I run same code in stand-alone script it executes without error, ...
4
votes
0answers
61 views

How can I modify layer order with the QGIS python API

Typically, after a new_layer = addRasterLayer(...) that inserts new_layer before the active layer, I'd like to move it to the top of the table of contents. How to do it? I use an existing QGIS ...
0
votes
1answer
157 views

How to zoom to the extent of Qgsvectolayer qgis?

Anyone know how to zoom to the extent of a Vectorlayer in qgis using python plugin?
0
votes
0answers
65 views

how can i read an attribute value from qgsfeature?

How can i read an attribute value from qgsfeature ? i am trying to update some attribute using other and i have to read value from attribute in the qgsfeature . my source code: provider = ...
0
votes
0answers
32 views

What is the action name in qgsinterface for the deselect feature from all the layer tool?

I want to add the deselect feature from all the layer tool in the toolbar when the qgis user start editing a vector layer. anyone know what is the name of this action in qgis api 1.8?
1
vote
1answer
124 views

How to activate a layer in QGIS layers legend

How can I activate a layer in qgis map legend automatically using python code . I am using qgis.utils.iface.setActiveLayer(self.theLayerToEdit) but the layer is still not checked in the maplegend. ...
0
votes
0answers
90 views

How to create a Layer from a list of points in PyQgis

I`ve developed an algorithm that generated an two dimensional array with points. Each subList of this array must be displayed as an polygon on the map view, and the recently created Vectors should be ...
0
votes
1answer
272 views

QGIS python - reference a layer in the table of contents

I'm trying to create a plugin for QGIS using python, But need some help. I want to 1.Zoom to a layer and 2. make the layer visible(switch off or on). But I have managed to zoom to an active layer by ...
1
vote
0answers
160 views

How to load the default layer style from Postgresql with Python?

I would like to write a python macro that upon opening my QGIS project file will reload the default style for each layer from the postgres 'layer_style' table. I have had a look at the documentation ...
0
votes
1answer
131 views

Split Map using Python in Qgis

I have a map, in which each region is defined as an attribute of the map (I can select each region from the attribute table). I am trying to create new layers each one containing only 1 region using ...
2
votes
0answers
667 views

legend groups and layer position/order qgis 1.8

I'm tring to programmatically create layer sequence also using groups. Simple python code: layer = QgsVectorLayer("004cp000.shp", "004cp000", "ogr") QgsMapLayerRegistry.instance().addMapLayer(layer) ...