[Qgis-developer] VectorFileWriter

Michaël Douchin michael.douchin at laposte.net
Thu Nov 29 11:22:41 EST 2007


Hi,
Thans barry for the information about the r. addition.
Now the rendering is ok, but qgis crashes :
- when I try to change the property manually
- when I quit qgis (from the file menu or by clicking on the cross.
It seems the python bindings do not interact well with C code here ?

My code :
                              vlayer = 
QgsVectorLayer(os.path.join(chemin,nom_court+".shp"), nom_court, "ogr")
                              if vlayer.isValid():
                                 #print "Layer loaded."
                                 #Style de la couche
                                 
r=QgsContinuousColorRenderer(vlayer.vectorType())
                                 r.smin=QgsSymbol(vlayer.vectorType(), 
"0","","")
                                 r.smax=QgsSymbol(vlayer.vectorType(), 
max_debdroit, "","")
                                 r.smin.setPen(QPen(Qt.green, 1.0))
                                 r.smax.setPen(QPen(Qt.red, 1.0))
                                 r.setMinimumSymbol(r.smin)
                                 r.setMaximumSymbol(r.smax)
                                 #champ de classification
                                 r.setClassificationField(4)
                                 #on applique le style
                                 vlayer.setRenderer(r)
                                
                                 #on ajoute la couche dans qgis
                                 
QgsMapLayerRegistry.instance().addMapLayer(vlayer)


>
> You're right, Barry!
> Now it should be fixed in r7675 for all renderers.
>
> Greetings
> Martin
>
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20071129/c8ab38ec/attachment.html


More information about the Qgis-developer mailing list