[Qgis-user] Flip
Siki Zoltan
siki at agt.bme.hu
Thu Aug 14 02:28:04 PDT 2014
Dear Diego,
here is a short python solution to flip all selected polylines in the
actual layer.
You can use it in the python console.
layer = qgis.utils.iface.mapCanvas().currentLayer()
for feature in layer.selectedFeatures():
geom = feature.geometry()
nodes = geom.asPolyline()
nodes.reverse()
newgeom = QgsGeometry.fromPolyline(nodes)
layer.changeGeometry(feature.id(),newgeom)
qgis.utils.iface.mapCanvas().refresh()
Zoltan
On Wed, 13 Aug 2014, Diego Lawrie wrote:
> Dear all, how can I switch line direction in QGIS?
> Thanks
>
More information about the Qgis-user
mailing list