TransWikia.com

Use line style to adjust rubberband in QGIS?

Geographic Information Systems Asked by markgraeflerland on February 20, 2021

I am digitizing lines and have to keep certain distances to other lines while digitizing.
Normally I would just use a buffer to generate these prohibited areas and snap to these polygons while digitizing. But I have only access to wms-layers so I cannot use snapping.
Therefore I would like to adjust the rubberband so I could always see a 5,10 and 20m distance-(rubberband)line while digitizing.

Is it possible to adjust more than just the color for the rubberband so I could always see these distances while digitizing?
Here is a example screenshot to show how it could look like (dotted line=digitized line, other three lines = distance lines).
enter image description here

One Answer

This might be worth trying. First created a temporary new linestring layer. This is for guide purposes only and can be deleted after the main digitising is complete.

Quickly (accurately!) draw a line along where you want to avoid. By the look of your image that would be the road verge (blue line). Then under Style of the layer properties add a new simple line and change the Symbol Layer Type to 'Geometry generator'. Set Geometry Type to 'Linestring/MultiLineString'. In the expression box write:

translate($geometry,3,4.07)

The second line is now offset by so much either to the left or right. When I did this on my computer using OSGB1936 coordinate system, the line was offset to ~5m (+- 0.1m).(I'm guessing this could get complicated if not using meters but I wouldn't know personally).

I repeated the previous step to create another two lines with this as the expression:

translate($geometry,6.2,8.03)
translate($geometry,12,16.27)

This offsets two lines at 10m and 20m.

If these line are created on the wrong side then just change them to negative numbers and the lines will be generated on the other side of your original.

You won't be able to snap to these lines but it'll give a good enough guide to digitize against.

geometry generator to offset lines by certain distance

The buffers in the image were also created using the geometry generator so I could get a decent guide (buffer($geometry,5))

Answered by Knightshound on February 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP