You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in the development Roadmap, there is currently limited "linkage" between different geometry types.
This isn't a problem for 95% of rendering, but there are cases where it is necessary to cross-reference between a node and the way(s) it is part of. Currently, for example, the turning circle / loop / mini-roundabout rendering in OSM Carto requires a relatively expensive and inelegant spatial join (ST_DWithin) to (re)determine the types of highways that a turning circle is connected to and then render with the correct colour etc. There are other places where we would like to do similar things, e.g. resolve problems with level crossings where the starting zoom level should be adjusted based on the type of railway it attached to, adjust station rendering depending on railway type etc.
As I understand, "linkage" between ways and multipolygons is achieved with callback functions so that relevant tags from the MP can be attached to constituent ways. You can imagine a similar mechanism for nodes / ways, where specific node types register a callback for further tag processing. That said, I don't think this callback mechanism is the most flexible / elegant solution, not least because you would need to make decisions about combining tags from multiple ways at import time.
I think the most flexible approach would be an explicit "node/way correlation table" with a row for every "connection of interest" e.g. turning circles, level crossings, railway stations etc. You would probably need to add primary key (serial-like type) to the node and way tables, rather than use the OSM ID as key/index. But having done this, the spatial joins would be simply replaced by normal SQL joins.
In the longer term, I'm sure there would be other applications of linking ways and nodes e.g. site-like relations where you would then know which nodes were contained within which bounding area.
[There was some related, but unresolved discussion in #2311.]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
As discussed in the development Roadmap, there is currently limited "linkage" between different geometry types.
This isn't a problem for 95% of rendering, but there are cases where it is necessary to cross-reference between a node and the way(s) it is part of. Currently, for example, the turning circle / loop / mini-roundabout rendering in OSM Carto requires a relatively expensive and inelegant spatial join (
ST_DWithin) to (re)determine the types of highways that a turning circle is connected to and then render with the correct colour etc. There are other places where we would like to do similar things, e.g. resolve problems with level crossings where the starting zoom level should be adjusted based on the type of railway it attached to, adjust station rendering depending on railway type etc.As I understand, "linkage" between ways and multipolygons is achieved with callback functions so that relevant tags from the MP can be attached to constituent ways. You can imagine a similar mechanism for nodes / ways, where specific node types register a callback for further tag processing. That said, I don't think this callback mechanism is the most flexible / elegant solution, not least because you would need to make decisions about combining tags from multiple ways at import time.
I think the most flexible approach would be an explicit "node/way correlation table" with a row for every "connection of interest" e.g. turning circles, level crossings, railway stations etc. You would probably need to add primary key (serial-like type) to the node and way tables, rather than use the OSM ID as key/index. But having done this, the spatial joins would be simply replaced by normal SQL joins.
In the longer term, I'm sure there would be other applications of linking ways and nodes e.g. site-like relations where you would then know which nodes were contained within which bounding area.
[There was some related, but unresolved discussion in #2311.]
Beta Was this translation helpful? Give feedback.
All reactions