Python bindings for QGIS.

learn more… | top users | synonyms

1
vote
0answers
33 views

qgis.core error [duplicate]

Possible Duplicate: qgis.core import error I am new in quantum gis and python, I installed quantum gis 1.8 from osgeo4w installer, after I installed python 2.7 and started python shell and ...
4
votes
2answers
327 views

How do I specify the position, style and units of the ScaleBar in pyqgis?

I would like to add a scale bar to my composition using the python console and then export it to a raster image. I am following the MapRendering tutorial with the "output using map composer " approach ...
2
votes
1answer
454 views

How to load a postgres view using pyQgis?

Under Qgis 1.8 on Windows 7 I have this problem with my pyArchInit plugin: I need to load on the map canvas my geometries from a postgis layer. Till the 1.7.4 version I use the method explained on the ...
8
votes
4answers
1k views

How to run sextante algorithms outside of qgis python console?

I'm kind of stuck trying to figure out the way to run sextante from a standalone python from OSGeo4W distribution. The reason I want to do this is that I got tired entering parameters in the dialog ...
2
votes
1answer
738 views

qgis.core import error

I would want to use the Qgis api for custom desktop application. When I imported the qgis.core module, I get the following error >>> import qgis.core Traceback (most recent call last): ...
1
vote
1answer
235 views

QGIS Updating composer label text via python - problem with Item Properties panel

I am writing a plugin that replaces the text of a composer label based on its itemID. When I change the text of the label using: item.setText("Hello World") the label changes on the composer but ...
1
vote
2answers
1k views

Problem loading vector layer (pyQGIS)

I've installed the qgis on ubuntu 12.04 following the instructions on http://hub.qgis.org/projects/quantum-gis/wiki/Download. I am trying to test the Python API and try to do the follwoing from ...
2
votes
1answer
214 views

How can i include program form (created in Designer ) to my QGIS plugin?

How can I include a form created in Designer in my QGIS plugin? And how to get controls values (textbox,label,etc)?
2
votes
1answer
1k views

How can I add button to the QGIS toolbox or create my own toolbox?

I want to create a button and add it to the QGIS toolbox or alternatively create my own toolbox and add the button here. A plugin should be started when the user clicks the button.
2
votes
1answer
206 views

Can't load PYQGIS

I get this error; any comments Couldn't load PyQGIS. Python support will be disabled. Traceback (most recent call last): File "", line 1, in ImportError: ...
3
votes
2answers
1k views

How can I specify the CRS of a raster layer in pyqgis?

I manipulating netcdf raster data from the QGIS python console. The metadata of my netcdf file does not provide the Reference system. However I know it is 'EPSG:4326' I am writing a python script to ...
3
votes
1answer
628 views

Changing attribute data types using PyQGIS

OK, so I've already asked a question how to access attribute data types when developing plugin for QGIS, using PyQGIS. And one helpful member said i should use pendingFields() method on the current ...
3
votes
1answer
146 views

How to display a particular area?

Hy, I'm developing a plugin in python for Qgis. I would like the user to select a particular area in a list (let say a country list) and zoom in the map on the corresponding area. Actually I'm ...
3
votes
1answer
1k views

How to use gdal_contour in QGIS Python console?

Is there a way to use the gdal_contour utility with-in the python console of qgis ? Thank you
5
votes
1answer
1k views

Why can't I import my script from the python console?

i am working with the qgis python console. I usually store all my python scripts into ~/Scripts/python I do have set the PYTHONPATH to ~/Scripts/python in my .bashrc However, I can not manage to ...
2
votes
2answers
2k views

How to access attribute data type in QGIS?

I've been developing a plugin on QGIS platform using PyQGIS. So far plugin does the following: You can select any feature of the already loaded vector layer in QGIS. After selection, plugin displays ...
2
votes
1answer
283 views

How to connect QGIS to a WMS-C with python?

I would like to connect my QGis to a WMS-C server when my python plugin load. How can I do that ? BTW, the method: addRasterLayer do not seams to handle WMS-C layer...
4
votes
1answer
589 views

How can I add OpenLayers layer from the python console?

I am new to the python console. How can I add a layer from the OpenLayers plugin from the python console? Thank you
2
votes
1answer
437 views

How to display local file's geometries as rubber bands in QGIS

I'd like to get geometries from a local file (e.g. GML) displayed as rubber bands (QgsRubberBands) in QGIS. However, I wouldn't like to load the layer into the map because in the real scenario there ...
3
votes
1answer
758 views

Get a pixel value

How can i do this operation: I want to get a pixel value fro the satellite image (Landat, GeoTIFF, 7 bands) using qgis-python. What operators should i use? (for example in qgis's Python Console) ...
1
vote
1answer
551 views

How to translate ESRI cursor example to pyQgis?

For example, how to translate this code into pyqgis? rows = gp.UpdateCursor("D:/St_Johns/data.mdb/roads") row = rows.Next() while row: row.buffer_distance = row.road_type * 100 ...
3
votes
1answer
290 views

How to move Layer to back?

from my Plugin I've loaded a rasterlayer using the following code: fileName = "/path/to/raster/file.tif" fileInfo = QFileInfo(fileName) baseName = fileInfo.baseName() rlayer = ...
1
vote
1answer
279 views

How to handle geometry change in Vector Layer?

Hy, I'm building a plugin in python that manage some lists of wkt from different intern sources (web services, bd, etc..). I can display every source without any problem. For displaying them, I use ...
2
votes
0answers
137 views

Setting border-style to 'no pen' using QgsGraduatedSymbolRendererV2

I am developing a QGIS plugin that, after a series of inputs, will produce a thematic map using the QgsGraduatedSymbolRendererV2. Because the polygon are very small, the boarders make it such that ...
0
votes
2answers
198 views

extract edge of a line of a vector layer in a new point layer [closed]

I'm using python to build a plug-in in Qgis. I need to extract the edges of each line feature of a vector layer to create a new point layer of all edges. Someone can help me? My data input is a vector ...
3
votes
2answers
143 views

How can I read the settings for the QgsPaperItem from XML?

I saved a template qpt for the map composer and now I want to read all the settings. I am able to insert the items with composition.addItemsfromXML... But this doesn't load the settings for the ...
2
votes
1answer
323 views

How to add Real Attributes to Shapefile using pyqgis?

I created the Qmarxan plugin using the fTools plugin as an example base. When I create a new shapefile using the QgsVectorFileWriter function I don't have any difficulty specifying a "Real" field with ...
10
votes
1answer
872 views

Is there a way to access QGIS plugins in Python?

Is there a way to access QGIS plugins in Python? I'd like to write a script to do some geoprocessing, and I'd like to use the clip, regular points and convex hull tools in fTools, as well as the Road ...