2

In QGIS I have a layer that is a MultiLineString that has many overlapping lines, which represent driving routes around the city which are generated using OSRM.

My data looks something like

[
[[a,b],[c,d],[e,f],[g,h]],
[[y,z],[a,b],[c,d],[e,f],[g,h]],
[[e,f],[g,h],[i,j],[k,l]]
]

where some segments are only recorded once, some twice, and some many more times (up to thousands of times).

How can I increase the width (line thickness) of segments of the routes based on the number of times they are overlapped?

I have a working solution using the JavaScript libraries OpenLayers and Turf but the solution is inefficient and cannot scale. See below for an example of the desired effect.

example

Answers that involve re-formatting the data or working in Python are within my scope.

Vince
  • 20,017
  • 15
  • 45
  • 64
rykener
  • 121
  • 2
  • Make sure each segment is a separate feature. Install the refFunctions plugin. Use data-defined settings for line width with the function intersecting_geom_count(). – csk Mar 06 '19 at 18:49
  • Would you be satisfied increasing the brightness of overlapping lines? Have a look at this Q&A about creating a "heatmap" of lines: https://gis.stackexchange.com/questions/286082/create-line-heatmap-with-qgis – csk Mar 06 '19 at 21:12
  • @csk, no, I specifically would like to increase the width. I will try the instructions from your previous comment tonight. – rykener Mar 06 '19 at 22:15

0 Answers0