3

I have a two category polygon layer. Where two polygons of different categories meet, one is always overlaid by the other so that you cannot see both edges even though the polygons are not overlapping. I know I can reorder the Symbol Levels to change the order in which the categories are rendered, but that just changes the priority of the display. Is it possible to display both polygon edges at the same time?

In the example below, I want to see both blue and orange lines at the boundary between the green and brown polygons.

enter image description here

4
  • How do you expect to see blue and orange lines when they overlap perfectly? I can think of a couple of ways: use a blend mode or opacity so that blue and orange overlapping show as some other colour; use a thick and a thin line and make sure the thin is on top of the thick; use dots or dashes so that overlapping lines show up; inset the polygons slightly so the borders don't overlap, but that messes up the geometry everywhere. Any of those useful? Other ideas>?
    – Spacedman
    Commented Sep 30, 2022 at 10:39
  • A "shapeburst" fill can also do this, by filling a small amount of the interior of each polygon.
    – Spacedman
    Commented Sep 30, 2022 at 10:40
  • Fair point about the perfect overlap @Spacedman, I just assumed there should be a graphical tweak that would allow display of both lines. The shapeburst fill is close, although the display is no longer as clean. I might have to go with insetting the polygons a little. It is only for graphical display, so messing up the geometry is not too much of a problem. Thanks.
    – EcologyTom
    Commented Sep 30, 2022 at 10:52
  • What would this mythical "graphical tweak" of yours actually look like? You can probably use a geometry generator to produce a negative buffered line as an inset polygon in the style dialog...
    – Spacedman
    Commented Sep 30, 2022 at 11:15

1 Answer 1

5

This is probably very "tuned" for my data and not optimal, but using a small negative buffer that is roughly the width of your outline should give you the impression you might be after. Here I'm generating a polygon from the geometry generator with a small negative buffer:

enter image description here

which looks like this:

enter image description here

you need to tweak the buffer size (note its in inches, not map units of any kind) and line width.

There's some pinholes in the corners. Maybe a better way is with two polygon fill symbology layers, and to "fake" the outline by having a slightly negatively buffered layer as the "fill" colour, and the full layer as the "outline" layer. You'd set both layers to have to outline, relying on the fill colour of the underneath layer to represent the "outline". Here's what the symbol design looks like for this:

enter image description here

A buffer in pixels works okay here too:

enter image description here

Giving:

enter image description here

The "outline" seen here is really the "fill" of the symbol layer underneath.

Tune the buffer width to adjust the outline width - I've probably exaggerated here to get the effect!

3
  • Perfect, thank you! The second option worked well. Just the graphical tweak I was looking for.
    – EcologyTom
    Commented Sep 30, 2022 at 11:47
  • 4
    A simpler way would be to add a symbol layer with type "Outline : Simple Line" and check the "draw line only inside polygon"....
    – J.R
    Commented Sep 30, 2022 at 11:50
  • @JR, that also works well, thanks.
    – EcologyTom
    Commented Sep 30, 2022 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.