I have created a road style with a thinner line overlaying a wider line, with different road classifications on different layers. I've used the advice here to make segmented lines continuous.

This does not work where roads meet:

road layers meet

I wonder if there is a solution to this eg should I take a different approach to rendering? I tried merging all the layers to one then classifying by road type but could not figure out how to then apply the thinner/wider line.

It's OS open data.

  • I assume you have line data?
    – Erik
    Nov 26 '18 at 8:10
  • Yes, I have line data Nov 26 '18 at 9:04
  • And what is the problem about the classification?
    – Erik
    Nov 26 '18 at 9:32
  • Sorry if I have been unclear - on the roundabout the 'red' road stoke overlays the roundabout road. Nov 26 '18 at 9:43
  • Yeah, but the red roads seems to be the more important one, thus it should overlay other roads.
    – Erik
    Nov 26 '18 at 9:46

Definitely go with one layer for all your roadways. If you take a look at the user guide for OS Open Roads, you'll see how the data structure is built.

enter image description here

You can take advantage of the nice layering order dialog called Symbol Order that can be found when you click on the Advanced button in the Symbology tab's bottom right. This would come after setting a rule-based symbology where everything that's a bridge gets a separate symbol.

enter image description here

In there, you can define the rendering order of every component of a symbology. The higher values render on top. In my example, the roads were symbolized similarly to your example but, after I changed the values as follows from the screenshot, the symbology looks like it should with outlines always rendered behind. Just make sure that bridges are at the top of the rendering passes.

enter image description here

  • 1
    Gabriel C.Thanks, finally got there. In OS openmaplocal, segments with bridges are shown where the "drawlevel" attribute is >1. As you suggested I used the merged layers and, instead of using 'categorised' as I had been, I used 'rule-based' so then could separate each road type into 'bridge' and 'non-bridge' segments - applying the symbol layers after that as you suggested. I still found csk's suggestion of flat end style useful for where a bridge segment meets a non-bridge segment. Nov 30 '18 at 22:03
  • should have said drawlevel >0 Dec 1 '18 at 13:36
  • Glad it worked out in the end!
    – Gabriel
    Dec 1 '18 at 19:28

ThingumaBob - your comment is the correct answer but I had no 'tick box' to mark it as correct. Now I have the 'seamless junction effect' I was after (although maybe I have an issue with bridges rendering correctly now):

EDIT - bridge issued solved by Gabriel C's advice, which is marked as the answer

seamless junctions

  • Merged the layers.
  • set the 'thinner and wider' line style
  • then categorised them by road type
  • organised the symbol layers
  • where I was getting stuck was how to apply a different style to each category. I hadn't realised I could simply click on the relevant symbol in the category list to edit the fill and stroke:

category menu


Change the cap style from square to flat.

enter image description here

This line has square end caps: enter image description here.

Here's the same line with flat end caps:enter image description here

  • I went back to my unmerged layers and applied this - would have been much quicker and simpler in my case. It also appears to avoid the problem that arises in the 'merged layer' solution where an overbridge renders as though it has an at-grade junction with the road below Nov 26 '18 at 21:21
  • @user3387656 This alone does not fix the rendering order. Your outlines will still overlay the main color at junctions. You just need to categorize the bridges differently and style them to always render on top, per my answer.
    – Gabriel
    Nov 26 '18 at 21:26
  • Gabriel C I can see you are right but unfortunately, categorising bridges separately would be an epic task given the map extent - a road network serving a population of 1,000,000. Perhaps I have to choose the lesser of two issues - in the 'flat end' solution the overbridge shows but the junction is not seamless but better than I had originally. Nov 26 '18 at 21:36
  • @user3387656 Check the OS Open Roads user guide. The attribute tables do contain a field that indicates if the road is on a bridge or in a tunnel. You should have everything needed to build a rule-based symbology. I'll update my answer to reflect this fact.
    – Gabriel
    Nov 26 '18 at 21:51

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.