Have a look at the [turning-circles.lua example in that
branch](https://github.com/joto/osm2pgsql/blob/id-cache/flex-config/turning-circles.lua).
It shows how this looks like. The "highways with TCs table" is called
`highway_ends` (not a great name). It contains the node and way ids, so you can
always use that to join other tables to get to the attributes you need. You can
either do that on import or at render time, whatever works best for your use
case.
> I'm also not clear on how the "highway with TCs table" is kept current during
> updates.
This will just work "magically" as other updates with osm2pgsql. If the way
changes, the entries are deleted and new ones written just like with any other
way-based table. And if the node changes, that change will automatically
trigger a way change for all ways that contain that node (like all node changes
do) which leads to the same result.
There is one extra thing I am currently looking at: Often you need the
*direction* of the way to render the node in some special way, say a barrier
that should be rendered perpendicular to the road. You can do that in SQL, but
it will be easier to do that with a little help from osm2pgsql. I am still
experimenting what the best way to do that would be, but in essence I want to
add a Lua function to get the azimuth, the angle between North and the line
direction, in that node, so you can, for instance, store it into an extra
column. For the first and last node the angle would be calculated based on the
first and last segments of the line, respectively. For inner nodes I think the
angle should be the "average" angle between the segment before and after the
node. If you have different needs there, I'd like to hear them.
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/discussions/2455#discussioncomment-16506782
You are receiving this because you are subscribed to this thread.
Message ID:
<osm2pgsql-dev/osm2pgsql/repo-discussions/2455/comments/[email protected]>
_______________________________________________
Tile-serving mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tile-serving