This is a simple example on how we can use TopoJSON to indicate the overlap of linestrings!
Therefore, I made a simple shapefile with 3 linestrings that overlap to 100%! And this is a prerequisite of your dataset, too! You can find the compressed file 'shapes.rar' within this Gist...
Decompress the file and make a TopoJSON of it:
topojson -p -o linestrings_topo.json linestrings.shp
(Haven't installed topojson? It is pretty easy...on Ubuntu)
Short 'codesprint':
-
set a new html-file with a leaflet map
-
open the TopoJSON-file
-
do for each arc:
-
get the members
-
set the popup text
-
set color
-
get feature of the arc
-
make and add a new polyline to the leaflet map (set color and popup)
-
-
add all polylines to the layer control (especially this is not good coded!)
That's it...pretty simple, I think! Finally...sorry, it is very hard coded!
This example is based on a previous tutorial: D3-Geodata-Basics