<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Alright, set up a GitHub account:
<a class="moz-txt-link-freetext" href="https://github.com/haav/python/tree/master/PointAdjust">https://github.com/haav/python/tree/master/PointAdjust</a><br>
I have to stress that it is really work in progress though.<br>
It works by putting in 2 feature ID-s (A and B) with needed
coordinates. The point A position is fixed and will be exactly as
entered, but for point B the resulting position may differ in
order to maintain the similarity. Thus, the new position of point
A is used for translation while point B coordinates are only used
to get the rotation angle. So, let's say we have the original
layer points A=(0;0) and B=(3;0) and the entered values for the
plugin are A=(-3;2), B=(-1;4). Thus the rotation angle will be 45
degrees.<br>
Ah, right, the "edit mode" has to be turned on to get any effect.<br>
<br>
Allar<br>
<br>
<br>
On 23/01/2013 15:14, Nathan Woodrow wrote:<br>
</div>
<blockquote
cite="mid:CAAi8Yg8gOrWOSr6T4rDJMg9182x1ABj=Y8ZJ-F6rXOdNTVTv-A@mail.gmail.com"
type="cite">
<p dir="ltr">Allar,</p>
<p dir="ltr">We will have to see some code to be of any help. Why
not consider putting it up on GitHub if you haven't already</p>
<p dir="ltr">-Nathan</p>
<div class="gmail_quote">On 24 Jan 2013 01:09, "Allar Haav" <<a
moz-do-not-send="true" href="mailto:allar.haav@gmail.com">allar.haav@gmail.com</a>>
wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
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.<br>
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.<br>
<br>
Regards,<br>
Allar<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a moz-do-not-send="true"
href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/qgis-developer"
target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>