1

Using model designer to automate a process and I would like to be able to rotate points whether it be using the affine transformation tool or the rotate tool. I have gotten both of these tools to successfully rotate the points, however, it moves these rotated points some distance away.

My process starts with a ring of points then:

points to path > Buffer > Points along geometry > Affine Transformation

What this does is extrapolate another ring of points from the original then rotates those points.

You might say rotating a circle of points does nothing, but they are not symmetrical, so it is important.

When trying variations of the tools (selecting various inputs) it seems to be able to place the new points in the right location, but it won't rotate them, if it successfully rotates them it will be in the wrong place.

I have a theory that the location the points are being moved to somehow corresponds with the angle of rotation. Is this a known error?

*Note: the image showing the difference between the points shows the rotated points being a distance away at roughly a 270 degree heading. My inputs for rotation around the z-axis correspond to this (360-100 = 260).

enter image description here

enter image description here

enter image description here

enter image description here

[![enter image description here][5]][5]

enter image description here

enter image description here

6
  • Hi Max welcome to GIS SE. I don't understand your task. Rotating point: around what? Can you show a before/ after image what you mean by rotating? Makes no sense to me otherwise. If you rotate points, they have to move somewhere, otherwise they would stay in place?
    – Babel
    Nov 7, 2023 at 20:00
  • Thanks for the response, I added some pictures for clarification. The unlabeled points are rotating around the other point (31). When I use the affine transformation tool, I can get these points to rotate like they are rotating around this point, however, they shift off of the original starting position for some reason. If using the rotate tool the same thing happens. I was able to set an anchor point for the other points to rotate around, but it would place these new points a large distance away.
    – Max
    Nov 7, 2023 at 20:12
  • Sorry I don't feel comfortable sharing this data. To recreate it you would just need a group of points in a circle with a point at the center of that circle.
    – Max
    Nov 7, 2023 at 20:18
  • The input is just the labeled points.
    – Max
    Nov 7, 2023 at 20:19
  • Sorry, I'm just trying to rotate points around another point. I've been using the rotate tool and affine transformation tool. I'm just using waypoints from lat long coordinates.
    – Max
    Nov 7, 2023 at 20:26

1 Answer 1

2

Don't use Affine Transformation for your task. Use Rotate tool instead. Define your input layer (original points, in blue on the 2nd screenshot below), a rotation anchor point and degrees to rotate and you get the red output points. In the model, define the correct Rotation anchor point, depending on which one that should be.

In the model, use a layer center containing one single point for Rotation anchor point and call it using this expression: make_point (@center_maxx , @center_maxy) - change this, depending on the name of the name for center you have in your model. The variables (here: @center_maxx and @center_maxy) are created automatically by QGIS, based on this name.

Your rotate tool should have two inputs: the points you want to rotate (=input layer - not the same as center!) and the center around which you rotate. See my screenshot. In your model (screenshot), I don't see which is the point you want to use as center of rotation. If you have the point in your model, it will show up like @center_maxx, but be named whatever your layer is named. Look for it in the expression string builder, in the middle part, on top of the list of functions.

enter image description here

enter image description here

5
  • how did you add 'center' to the model designer?
    – Max
    Nov 7, 2023 at 20:57
  • I understand that, but how do I correspond that vector layer with a layer in my model?
    – Max
    Nov 7, 2023 at 21:06
  • I have that point, are you saying it would show up like @center_maxx, but be named whatever my layer is named?
    – Max
    Nov 7, 2023 at 21:12
  • I am still unable to recreate what you did, I will send some pictures of my setup and hopefully you can guide me.
    – Max
    Nov 7, 2023 at 21:28
  • I got it working, thanks for your kindness and patience. Much appreciated!
    – Max
    Nov 7, 2023 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.