Wednesday, 9 May 2018

style - Styling segmented cased lines in QGIS?



My client wants a map of bus routes rendered as white lines with blue casing. I'm using QGIS 2.8.2 on Mac OSX 10.10.5. I found a .kml dataset here: http://developer.trimet.org/gis/data/tm_routes.kml. I also tried using the .shp.


When I add the layer to the map and apply a cased line styling, some of the routes render as nice unified lines and others render as segmented, like earthworms:


enter image description here


I could easily cheat and render a duplicate layer (featuring only the thin white lines) on top of this one.


Why do the lines render in different ways?



Is there a way to render them all as unified?



Answer



Very nice answer by @AndreJ which should get you the nicest results. An alternative is to change the Cap style of your blue line to Flat. This should get rid of most of those segmented appearences (tested on the .kml file you linked to):



  • Without Flat cap style:


Without flat cap style



  • With Flat cap style



With flat cap style


Hope this helps!


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...