Re: [Qgis-developer] How to iterate over the vertices of a geometry from python

2012-05-13 Thread Nathan Woodrow
Sure. You can use: for v in geom.asPolyline(): print v.x(), v.y() asPolyline returns QVector which is just a List of QgsPoints in Python. Access like normal - Nathan On Sun, May 13, 2012 at 9:48 PM, Ricardo Filipe Soares Garcia da wrote: > Hi list > > I'm trying to translate and rotate a

[Qgis-developer] How to iterate over the vertices of a geometry from python

2012-05-13 Thread Ricardo Filipe Soares Garcia da
Hi list I'm trying to translate and rotate a geometry using python, in order to create parallel lines. For the translation I could use QgsGeometry's translate() method, but for the rotation I haven't found a ready-made solution. So my current strategy is to individually rotate each vertex, accord