3

I have a model that I built using model builder that creates a rectangle grid and then rotates it. For some reason, when I use rotate, it creates something wrong-

enter image description here

and it creates''holes'' between the rectangles- enter image description here

When I use the model to create line grid and rotate it, it works well but is different . enter image description here

How can I solve it?

My end goal is to have rotated grid that will be made of polygons. I tried also to create polygons from the grid lines but it didn't work

  • It looks like every single feature is rotated around its center. You could try to combine/union/collect/merge all features to one multipolygon (singlepart to multipart, etc.). – Stefan Aug 22 at 9:20
4

I am not sure how did you rotate the polygon grid, but it seems you have used Rotate tool from Processing toolbox. If so, you need to specify the Rotation anchor [x,y], which enables you to select the rotation position directly from the map canvas, as you can see below:

Before rotation:

enter image description here

Using Rotate tool:

enter image description here

The Rotation anchor [x,y] was selected at the center of the intersection of the 4 polygons:

Final result:

enter image description here

Alternatively, you can use the edit button to start editing, then select all polygons using the selection tool, and finally use the rotate tool enter image description here to rotate the polygons

enter image description here

But be careful, if you choose the alternative approach make sure to work on a copy of the polygon grid because once you save the edit it is irreversible.

  • But if I work with a model builder, I can't choose an anchor – Reut Aug 22 at 8:42
  • @Reut You did not mention that you are using Model builder in your question. Please update your question, and write the method(s) that you are using. – ahmadhanb Aug 22 at 8:44
  • it says on the first sentence that I have model – Reut Aug 22 at 8:47
  • 1
    @Reut I have a model is different from I am using model builder to rotate polygons. – ahmadhanb Aug 22 at 8:50
  • 1
    Does the rotation tool in the model builder allow you to set an expression-based anchor point? If so, an expression like this should work: centroid(collect($geometry)) – csk Aug 22 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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