This has puzzled me for a while. Getting OSM data using plugins like Gismo is really interesting but it can be difficult to process the curves into networks to do further work on. I would love to be able to turn OSM road data into a curve network that could then be used to show traffic density if each node could be given a weighting representing population size of the town at that road junction and then the curve network given a colour gradient or thickness to represent traffic volume.
The problem with OSM road data is that it can give lots of curves that are actually one road. You can see in this image, the dual carriageway with roundabout and sliproads are lots of curves whereas I just want one curve with nodes to represent the network:
If I use a component like Flexibility’s Capture I can export a bitmap that starts to rationalise these curves. It would be much nicer to be able to capture specific areas rather than the viewport:
I was hoping to then use Rooster Rooster component to turn this back into curves but it picks up the edges rather than the centre of what were the roads:
Kind of cool, but not what I want!
This has cropped up on here before:
Simplify OSM Street Edges
The process I’m aiming for is like increasing the thickness of lines so that close curves merge together. Can edge bundling do this but keep to the original road layout instead of smoothing the curves? To get something like this from OSM road data, but merging curves:
https://discourse.mcneel.com/t/from-edge-bundling-wooly-paths-to-surface-between/50253
Let’s assume I do manage to get a nice clean curve network representing the roads on a map. (I will try and create an example file manually to experiment with) My next step would be to add values to nodes representing population size (or a weighting for traffic) and then look at shortest paths between all the nodes summing any weighting values to create a colour gradient or curve thickness to visualise traffic density.
The Edge Bundling discussions seem relevant to this, but not quite what I’m after. I don’t want to smooth the curves, I want to be able to create a visual indication of traffic density on top of an actual map of the roads and then be able to see what changes if a road was closed or a new road was built.
Any thoughts on this would be appreciated!
Here’s example OSM Road data:
OSM_Internalised.gh (2.6 MB)
If you have Flexibility and Rooster already: (remember to change filepaths to suit your PC)
OSM_Flexibility_Rooster.gh (2.6 MB)
An attempt to add traffic density to a line network with node weighting:
TrafficWeightingShortestWalk.gh (7.9 KB)