> in the same way as before but with layer.getFeatures(): > > layer = qgis.utils.iface.activeLayer() > for elem in layer.getFeatures(): > geom= elem.geometry() > poly = geom.asPolygon() > > poly.wkbType() == QGis.WKBPolygon > True > # coordinates of vertex: > print poly > [[(232139,110988), (232673,110410), (232311,110090), > (231814,110190), > (231684,110648), (232139,110988)]]. >
...strange, because also using your code, I had this error poly.wkbType() == QGis.WKBPolygon AttributeError: 'list' object has no attribute 'wkbType' What I do not understand is: for what reason getting coordinates is different from Lines and Polygon ? Perhaps, Is this a new of PyQGis 2 ? Thank you Roberto
_______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
