[Tile-serving] [openstreetmap/osm2pgsql] Feature request: deletion of relation members (#1325)
Jochen Topf
notifications at github.com
Tue Nov 17 16:21:43 UTC 2020
Osm2pgsql is specifically designed to magically handle the updating for you, so that you don't have to think about it any more. That's why it doesn't tell you if something is new vs. it changed vs. it is deleted. But that only works if you let it do its job and not try to work around it.
I believe your thinking is unnecessarily complex here. You should be able to solve your problems without thinking about updates. (Sure there is a limit to what this approach can handle, but I don't think your use case can not be handled with this.)
Basically I see two options for you:
1. Have a "relation_members" table that will contain all relation members you are interested in. Define it with `define_relation_table()` and fill it in the relations callback, call `add_row()` for each relation member there. This approach makes sure that osm2pgsql will correctly remove entries from this table whenever the relation membership changes. Of course this table can't have any tags from the member ways in it, but you can define a VIEW merging this table with one filled in the ways callback.
2. Use the 2-stage processing. The `flex-config/route-relations.lua` example config does this.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1325#issuecomment-729039313
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20201117/d05c2c27/attachment.htm>
More information about the Tile-serving
mailing list