[Tile-serving] [openstreetmap/osm2pgsql] Filter relation members based on "role" and / or "tags" (Discussion #1610)
mboeringa
notifications at github.com
Mon Jan 17 23:17:11 UTC 2022
Hi @joto,
I figured something like this would be necessary. It is along the lines of the other work I did on the **admin_level** boundaries based on Paul's initial implementation in the Lua style, but not _quite_ the same.
I think it would still be valuable to have a basic filtering option for OpenStreetMap relation members as well.
In this particular case, it adds quite a bit of essentially unnecessary post-processing overhead, while all I want is osm2pgsql to select a subset of relation members based on role membership.
In essence, some basic filtering is already applied by osm2pgsql: if I define a table as 'MultiLineString', osm2pgsql already seems to ignore any 'node' and nested 'relation' members, and only uses the 'way' members to construct the waterway relation geometry. It would feel like a natural extension to this, to be able to instruct osm2pgsql to ignore certain members at import stage.
There's also a gotcha with using the stage1/2 strategy: joining the lines back up to a single geometry representing the waterway relation, will require some union or dissolve process, which means that in order to maintain certain tags, these tags must be included in the dissolve process. Including the 'tags' hstore/jsonb column of a relation, may be difficult in this case, and may lead to the loss of access to all tags of the original relation if the 'tags' column cannot be properly included in the dissolve process. It will at least be more difficult to handle this.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/discussions/1610#discussioncomment-1986842
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/repo-discussions/1610/comments/1986842 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220117/8b298c01/attachment.htm>
More information about the Tile-serving
mailing list