4

I need to draw a series of parallel lines, within a polygon (See example below). Previously I have used MapInfo for this (Easy to draw a grid and delete the horisontal lines), but my workplace is transitioning over to QGIS.

How do I do this in QGIS?

I have seen a few guides that does not quite fit what we need and which, to be honest, seemed fairly hard to follow for people with no formal training in using GIS software.

enter image description here

The purpose is for digging trenches during archaeological trial excavations prior to development projects, where a north-south trench is dug for every 15 meters.

2
  • Do you need the lines just as an illustration, then you can use BERAs answer below, or do you need to e.g. upload the lines in a GPS to follow them in the terrain? Dec 2 '21 at 13:37
  • 1
    I need to be able to export them in .dxf, so that can be uploaded in the excavators GPS and/or our handheld GPS-system. Dec 2 '21 at 13:40
6

If you dont need the lines as a separate layer, you can just set a line pattern fill:

enter image description here

If you need the lines as a layer:

  1. Create a line grid with 15 m spacing
  2. Extract vertical lines with the expression main_angle($geometry) IN(0, 180)
  3. Clip grid with input polygons

enter image description here

1
  • Yes but it is a bit tricky to chose it so it it fits within the extent (or you get an error), but doesnt create any lines
    – BERA
    Dec 2 '21 at 14:42

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.