14

I am trying to create a brick wall style for a vector polygon in QGIS 2 and 3. I can render a svg drawing of a brick wall with SVG fill (image below). But I do not want to use SVG since the style is part of a free geological map, where the SVG file will complicate the distribution and rendering of the data for the public. Saving the SVG through a default QML forces relative paths to the SVG file in the QML file and the SVG file must be in the QGIS system SVG folder.

Anyone created a polygon vector style like:

enter image description here

That does not need a external SVG file for rendering.

  • 1
    Got tantalizingly close to it. I think it's possible with two line pattern fills, each with one simple and one offset marker line (using the | symbol), and the second one offset a bit to the right and down. QGIS 3.2 keeps crashing when I try this though, you might have more luck. – Steven Kay Aug 6 '18 at 17:13
17

Use a point pattern fill, with half_square marker and 90 degree rotation

Marker size: 10mm

enter image description here

Distance: Horizontal 10mm, Vertical 5mm

Displacement: Horizontal 5mm, Vertical 0mm

enter image description here

Result: consistent brick pattern fill regardless of polygon shape

enter image description here

For a different size of brick pattern, use these proportions, where X is the size of your point marker:

  • Marker size: 2X
  • Distance: Horizontal 2X, Vertical X
  • Displacement: Horizontal X, Vertical 0

Here's what it looks like with different point markers and all the other settings the same:

Hexagon enter image description here Cross_fill enter image description here Circle enter image description here Semi_circle enter image description here Triangle enter image description here

  • well done! i think it might also be possible with two thick line pattern fills using different dash patterns. this would make a nice addition to the QGIS pattern library :-) – Steven Kay Aug 6 '18 at 17:33
  • I tried it with dash patterns, but the custom dash pattern didn't work how I expected. I expected a dash pattern '5,5' with millimeters as units would give a 5mm long dash with a 5mm space, but instead it's an invisible line. So I'm not sure if that feature is buggy, or if I just don't understand how it works. – csk Aug 6 '18 at 18:08
  • Thanks, works very nice. The rectangle marker is called half_square in my QGIS 2.18.21 and 3.2.1. One problem though is that the style does not render in the legend in TOC - leaving a empty white box. This may be some style scaling problem rendering the legend in TOC - will report this to the qgis dev team. – Jakob Aug 7 '18 at 11:54
  • That's just a scaling issue. The style box in the layer legend is only about 4mm wide, so when the bricks are 5x10mm the pattern doesn't fit. It displays properly when the bricks are smaller than the icon, say 2mm x 4mm. It might be a nice feature if there was an option to make the style box larger, or have large patterns shrink to fit. – csk Aug 7 '18 at 19: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.