I am using QGIS 3.4. I am new in gis and I am trying to rotate a feature of a vector layer.
for ft in feat: vlayer.startEditing() the_geom = ft.geometry() pt = ft.geometry().centroid().asPoint() the_geom.rotate(-90, pt) ft.setGeometry(the_geom) iface.mapCanvas().refresh() vlayer.commitChanges() break
The geometry of the feature seems to change. However, I can not see any difference on the canvas.
Is there a better way to do this?