6

My task is to reproduce a map of a specific place. The problem are the borders which I can´t reproduce in QGIS.

The attached picture shows the line. It looks like a polygon filled with slashes.

d

Any ideas how I could reproduce this?

  • 2
    Can you include your picture here on GIS SE instead of an external link? Also asking about two software products in one question often tends the question beeing closed as too broad. I recommend asking two separate questions about each software. – MrXsquared Nov 19 at 16:24
  • 2
    It would be much easier to solve the problem in QGIS. Thanks for adding the image! – Chris Nov 19 at 16:28
  • 1
    What are you having trouble to reproduce? The line filled polygon or the big green border at the top of the map? – TurboGraphxBeige Nov 19 at 16:38
  • 1
    Oh I´m sorry, its the line filled polygon :-) How can I produce something like that without having a polygon layer with this dimensions? – Chris Nov 19 at 16:39
  • 1
    You can use QGIS' symbology tool to produce a pattern by superimposing black lines rotated over a thick white line, but for cartographic purpose I suggest you create a buffer with the wanted width (beware it's scale dependent unlike the symbology tool) and then fill it with the pattern you want. – BFlat Nov 19 at 16:44
12

Option 1 - Quickest way

There is actually a quite immediate way to obtain that effect:

  • double click on the layer you want to style (in your case the border layer)
  • under Symbology select Hashed line
  • play around with the settings. To obtain something similar to the example of the question, set Rotation to 45° (or -45°)

image showing how to set a hatched border for a polygon in QGIS

Option 2 - Quick way

Always through a style-based only approach, a more refined way is to:

  • use the Geometry generator feature of QGIS to create a buffer at render time (I just set this to Polygon/MultiPolygon, then buffer($geometry,55)),
  • fill it with a light background
  • add a hashed fill

Much nicer effect, IMHO:

enter image description here

details about the hash filling enter image description here

  • 1
    Thank you very much! I found the function - I used QGIS 3.4 and there´s no such function - downloading a newer version :-) – Chris Nov 19 at 16:49
  • 2
    This can be quite messy with coarse boundaries, it depends on the result you want. But for cartography, you might want to go for the buffer/dissolve method as it will prevent overlapping hashed lines. – BFlat Nov 19 at 16:50
  • 2
    @RafDouglas, which program did you used for the screen shots and including the steps via numbers? – whyzar Nov 19 at 16:55
  • 2
    @whyzar I use a (quite old and unmaintained, but still excellent) program called HotShot (sourceforge.net/projects/hotshots) – RafDouglas Nov 19 at 16:57
6

You could create the border as a line then buffer the line the right distance (it will depend of your map scale) to get a polygon and style this polygon with a line pattern fill and no border.

To create the buffer you may use the tool from the processing toolbox (create a new polygon layer) or use the geometry generator in the border line style (better if you dont want to create new layer)

EDIT

The geometry generator expression will be like this :

 buffer( $geometry,50,1)

it create a 50m buffer (the buffer unit is the same as layer unit, in this case meters) with pointy end (second value : 1, the bigger the value the more the end are circular)

  • Thank´s a lot! I´ll try that one and let you know if it worked! :-) – Chris Nov 19 at 16:42
4

Open the symbology menu of your layer and choose outline marker line.

enter image description here

Make sure to uncheck rotate marker.

enter image description here

Then navigate to simple marker.

enter image description here

Choose the line as symbol and rotate it by -45°.

enter image description here

Do additional styles if you wish.

3

enter image description here If you have an already existing polygon layer, you can simply do something like this: (Polygon with line pattern fill, no border) enter image description here enter image description here

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.