Hi, See https://github.com/EcoGIS/CAPS-Scenario-Builder to download lots of well commented python code.
See http://qgis.org/pyqgis-cookbook/index.html This code works for me. I'm using the 1.71API and my app is a desktop app rather than a plugin. feat = QgsFeature() roundPointGeom = None while provider.nextFeature(feat): point = feat.geometry().asPoint() roundPointGeom = QgsGeometry.fromPoint(QgsPoint(round(point.x(), 2), round(point.y(), 2))) provider.changeGeometryValues({feat.id(): roundPointGeom}) and elif vlayer.geometryType() == 1: # line while provider.nextFeature(feat): roundedLine = [] line = feat.geometry().asPolyline() for point in line: roundedLine.append(QgsPoint(round(point.x(), 2), round(point.y(), 2))) provider.changeGeometryValues({feat.id(): QgsGeometry.fromPolyline(roundedLine)}) ----- Daystar ...computing and research services 367 Four Mile Brook Rd. Northfield, MA 01360 Phone: (413)834-2076 Fax: (978)882-0243 bobe...@gmail.com Check out the updated CV/Resume: http://edaystar.com -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/cannot-call-QgsVectorDataProvider-changeGeometryValues-from-python-tp7195861p7201037.html Sent from the qgis-developer mailing list archive at Nabble.com. _______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer