[Qgis-developer] Still can't select features prior to dissolve

Michael McInnis mmcinnis59 at msn.com
Mon Feb 24 13:33:31 PST 2014


// This works !!!!

from osgeo import ogr

canvas =
qgis.utils.iface.mapCanvas()

allLayers = canvas.layers()

for i in allLayers: i.selectAll(); print i.name(); print
i.selectedFeatureCount()
(In the python Console)
Above you use the current layer (i) to i.selectAll();
How do you do a selection using attribute values such as 
i.selectFeatures("LWFLAG" != 'P')
to set the selected features for the dissolve function?
qgis.analysis.QgsGeometryAnalyzer.dissolve?4(QgsVectorLayer,
QString, bool onlySelectedFeatures=True, int uniqueIdField=-1) -> bool
Michael McInnis
6033 44th Ave. N.E.
Seattle, WA 98115
206 517-4701 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140224/c756b3d2/attachment.html>


More information about the Qgis-developer mailing list