> The highways table is just for this example, it could be the "regular"
> planet_osm_line?
Yes.
> In the highways_end table, could this be "node-based" rather than way based?
> ...
It needs to be "way-based" because only then the updates will work. But there
is no problem having the `node_id` in there (which it is in that example) so
that doesn't matter. And osm2pgsql can add an index on the `node_id` column as
well, if you need that.
> Is it necessary to pull out the tags of interest into highways_end, or can
> you address the way / node directly as in the SQL query above?
As I mentioned above you can do it this or that way as you like. There are
performance tradeoffs obviously, you just have to check what works best for
your use case. The underlying mechanism doesn't care.
> Am I right in thinking that the geometries are included in highways_end
> (rather than simply indices) to manage updates / expiry?
No, they are there to make rendering easy and cheap without extra joins needed
at render-time. It doesn't mater for osm2pgsql.
> Either way, would the node and way geometries be accessible to the SQL query?
Of course.
> Connected to the point above, we would want to make the "joining tables" as
> general as possible to avoid a re-import.
>From a performance standpoint I would recommend to use several small tables
>instead of a few large tables. But, as you said, that comes with the tradeoff,
>you might need re-imports when the data format changes. Osm2pgsql is agnostic
>in that debate, you choose the database layout you want. You can certainly
>have a "tagged nodes that are potentially in highways"-table that contains
>turning circles, barriers, passes, traffic lights and so on. Just keep in mind
>to not make that table too big, because it has to fit in memory and it is
>downloaded from the database for every update cycle.
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/discussions/2455#discussioncomment-16526040
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