I am using QGIS with OpenStreetMap data and I am trying to copy the way OpenStreetMap renders the order of their roads using the 'z-order' field. I am very close, I managed to use the layer properties to blend the roads where they join together using 'symbol levels' in the Symbology tab:
However, where roads are elevated over other roads I want it to look like the picture below in OpenStreetMap. I know they use the 'z-order' field and I know this can be done in QGIS using the 'control feature rendering order' option and choosing the z-order field, but I can't seem to get it to work.
The following are my layer symbol properties. I also checked 'Control feature rendering order' and used the z-order field:
I set my Symbol Levels as follows:
And I get the image below.
so I think I am close. I think the key may have something to do with the "bridge"=>"yes" tag in the Other_Tags attribute. Please see my new symbol properties above, I duplicated the symbols so one set has bridges and the other does not (LIKE and NOT LIKE). I then set the symbol levels so the "bridged" set renders above the "non-bridged" set. Plus, I checked 'Control feature rendering order' and used the z-order field. I also made the outer line flat as @mapperx recommended which helped. I was able to produce the last image above which I think is very close. However, you can see there are now "breaks" (circled red) where two segments join that both include the tags "bridge"=>"yes". This makes sense because of the way I setup the symbol levels. I have played with this for most of the day, but I can't for the life of me figure this out. I know it can be done because OpenStreetMap does it perfectly.