Hi,
I imported the street edges from OSM and am trying to simplify them so that there is one curve per street instead of a bunch of curves per street as they are now, but I can’t figure out how to achieve this… Does anyone have a recommendation on how to approach this problem?
Please find attached the GH file with the imported data and a sketch of what I want to achieve.
Thank you for your time!
OSM_Street_Edges.gh (495.3 KB)
I’ve wondered about this before. The Gismo plugin does a good job of managing roads.
Creating simple curves or surfaces from the map data looks simple but never is!
I thought maybe something like Rooster ,which can create curves from bitmap images, would be a nice solution if it could take a load of curves as an input instead of a bitmap and create output curves in the same way.
1 Like
This might be amusing? I cobbled parts of my ‘Tree/List Viewer’ tool to select a ‘Field’ (first purple group) and value (white group) to show the “streets” (in yellow) with that property.
‘tunnel’ == ‘T’ (true)
‘maxspeed’ == ‘30’
OSM_Streets_2024Aug3a.gh (516.1 KB)
P.S. ‘maxspeed’ == ‘50’ looks suspect? Too many city streets with 50 mph speed limits?
Another interesting way to look at this data? The streets are sorted and colored by how many duplicate names are found, an indication (perhaps) of their “importance”?
An earlier version with the ‘Split’ slider set to ‘0.083’:
(note that colors are bolder when the ColorBa component is selected)
“Final” version showing street names (yellow group) and ‘Split’ slider (blue group) set to ‘0.036’:
OSM_Streets_2024Aug3b.gh (528.1 KB)
Thank you for the fast response.
Following your definition, I grouped the edges by name. Then, I used the nodes’ edges as training data, using the ML regression component (both linear and nonlinear) from Lunch Box to calculate the fitting curve, which simplified the streets’ edges into one curve. I managed to make it work with one single street, but I got stuck trying to run the script with all the streets at once. I am not sure what I am missing, it would be great to have some advice.
Thanks
OSM_Streets_Linear_Regression.gh (535.4 KB)
Thank you for the advice. I am not familiar with those plugins, but I will look into it.
Good luck and have fun. There is much that can be done with this data.
1 Like