2

I cannot resize a rectangle polygon feature in QGIS in a way that retains right angles on all the vertices.

There does seem to be an “intent” for this capability to exist via the “snap to common angle” setting in the advanced digitizing settings. But it does not work as I think it’s intended i.e. the “snapping” doesn’t happen.

Here’s what I want to do: I’m in QGIS 3.10-8-A Coruna, running on my MacBookPro (macOS Catalina 10.15.7). I have a vector shape layer selected (type polygon). I “toggle editing”, which activates my “shape digitizing toolbar” and “advanced digitizing toolbar”. I click the “enable advanced digitizing tools”. In the Advanced Ditizing settings menu (gear button), I select 90, 180, 270, 360 for snapping to common angles. Finally, I draw a rectangle: On the “shape digitizing toolbar”, I select “add rectangle from 3 points”, and make a rectangle using the “add rectangle from 3 points (distance from 2nd and 3rd point)”. For drawing the initial rectangle, everything works fine, including the snapping to 90-degree angles. I then try to resize the rectangle, by first clicking on the “vertex tool”, then mousing over a side of the rectangle (which highlights as red), clicking, and moving it to make the rectangle bigger. Although the readout indicates snapping when I’m within 8 degrees of 90.0, if I click again to set the position, it doesn’t snap to 90 degrees, but moves the rectangle side over to wherever my mouse was, leaving a rhomboid instead of a rectangle.

To me, this almost seems like a bug, because I’m pretty sure the intent was that the angle would snap to 90 degrees when the read-out has snapped to 90 degrees. But I'm not sure.

Can anyone confirm this behavior and, does anyone have a tried and true method for resizing a rectangle that preserves all 90-degree angles?

5
  • I suggest you realize which size you need before creating the rectangle, then use the rectangles ovals diamonds tool to create the polygons. – Erik Nov 24 '20 at 8:35
  • To extend @Erik's comment, check this thread gis.stackexchange.com/questions/373626/… – Taras Nov 24 '20 at 9:18
  • 1
    I've observed the same behavior in 3.14. Your logic seems valid to me. Adding point on the side of rectangle works as expected (angle is preserved). Even if angle is locked in Advanced Digitizing toolbar (or even if distance is defined there) - still left-clicking changes the position to current exact mouse position. Note: if d and a are defined in Advanced Digitizing - it calculates proper x,y position and shows it graphically - but I don't know how to utilize it. – Szym Nov 24 '20 at 18:55
  • @Erik, I appreciate the suggestion, but it doesn't fit my use case. I need to quickly adjust the size and position of the rectangle based on things I am seeing in other layers (this is for setting up rectangular domains for a weather predictiion model). So it's a visual process. Determining numerical extents and entering them into a data entry box is would be very tedious compared to simple dragging of the sides of the rectangle to the location that I can see that I want them. – NotSoGiantSequoia Dec 1 '20 at 16:04
  • Could this be a projection issue? I'm not sure how QGIS handles this and if you have just a very small extent on a local scale (where the effect can be ignored) or an extent on global scale. Consider: on earth's surface, you can have a triangle with 3*90 degrees(!), consisting of the equator and two meridians connecting the north or south pole to the points on the equator at 0 degrees and 90 degrees. This is impossible in Euclidean geometry. What CRS are you using and does it measure angles in planar or ellipsoidal mode? – Babel Feb 1 at 13:28
0

Using vertex tool, you should select both the vertex of the side you want to move (dragging the left mouse button), they should turn blue and then you should move the whole side. If you are not using the fixed angle (90,180,270..), you could keep the angle 90°, using parallel button( in the advance digitizing toolbox). Let me know if I understood the problem and if I was clear.

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.