I'm sorry for the vague title, I didn't really know how to name this. I am working on a project that visualizes and simulates 17th century trade. For this project we also use so called Minard lines to show how certain goods are distributed. To clarify I made this screenshot:
However, as you can see every route is a seperate line (Amsterdam Jakarta and Rotterdam Jakarta for instance) and they all overlap with each other. This does give a nice Tron effect, but we actually want to merge them. We want to merge the lines that overlap (while adding their values), and segmentize those that don't (while remaining their values).
I've been thinking a lot about this on how to do this in postgres and postgis, but I'm having real troubles with it. Functions like ST_union aggregates everything, Could anyone point me in the right direction? Here's a screenshot of the database:
أكثر...

However, as you can see every route is a seperate line (Amsterdam Jakarta and Rotterdam Jakarta for instance) and they all overlap with each other. This does give a nice Tron effect, but we actually want to merge them. We want to merge the lines that overlap (while adding their values), and segmentize those that don't (while remaining their values).
I've been thinking a lot about this on how to do this in postgres and postgis, but I'm having real troubles with it. Functions like ST_union aggregates everything, Could anyone point me in the right direction? Here's a screenshot of the database:

أكثر...