[Qgis-developer] use of SymbologyExport

Pim Verver pim at travelingo.nl
Fri Dec 27 05:32:12 PST 2013


I am using the QGis python console for the use of exporting an active layer from postgist to a shape file layer.  I want to include the symbology as is possible through the GUI of QGis 2.

I am using the writeAsVectorFormat<http://www.qgis.org/api/classQgsVectorFileWriter.html#a289af78b5b609fbcb0572aaf505f2822> method of the QgsVectorFileWriter class, but keep getting errors as if the parameter doesn´t exist. Can anybody give me an example of the use of this method that includes the used symbology of the original layer.

Th alternative would be save the style als SLD and import the style file after creating the shape layer, but if I can avoid that ...

Thanx in advance kinds regards,

Pim Verver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20131227/79d2ee9c/attachment.html>

More information about the Qgis-developer mailing list