[Qgis-developer] Python skipping features for unknown reason

Allar Haav allar.haav at gmail.com
Wed Jan 23 07:09:32 PST 2013


Hi all,

I recently started learning Python and I'm currently finishing my first 
plugin that I really needed for QGIS - it performs a simple similarity 
transform on point layer. While the familiar qgsAffine presupposes that 
I know exactly the translation and rotation parameters, there often 
cases when I do not. What I might have is just information (GPS 
measurements for example) that points A and B should have coordinates 
x1,y1 and x2,y2. And that's it.
So far I've managed to get everything working, but I have run into weird 
problems. When I perform the operations on really small datasets, 
everything is working fine. But when I have a layer with, say 600 
points, QGIS starts acting weird. Sometimes it performs ok, yet once in 
a while some points aren't affected by the transformation, basically it 
starts skipping features. It seems as if the memory buffer is overloaded 
(?). Any ideas on that? The code in main transformation method is put 
between beginEditCommand() and endEditCommand(), the points are moved 
using moveVertex() function.

Regards,
Allar


More information about the Qgis-developer mailing list