[Tile-serving] [openstreetmap/osm2pgsql] Filter relation members based on "role" and / or "tags" (Discussion #1610)
mboeringa
notifications at github.com
Sun Jan 16 18:34:57 UTC 2022
I am sure this was this discussed last year in the online meeting about the osm2pgsql "flex" development, but for the life of me, I can't remember any answer: is there a way to filter relation members in the Lua flex style based on "role" and / or "tags"?
E.g. let's say I want osm2pgsql to build a **type=waterway** relation's geometry based on member ways having the role "main_stream" **_only_**, so no member ways with other roles should be included in the final geometry representing the relation.
Is this possible? I have looked through the osm2pgsql manual and noticed the section about [Processing Callbacks](https://osm2pgsql.org/doc/manual.html#processing-callbacks), which lists the **object** properties, which includes a **members** field, that refers to the needed information in an array of Lua tables, but it is unclear to me how and if I could use this to filter on a member's role before osm2pgsql constructs the output geometry of the relation.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/discussions/1610
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/repo-discussions/1610 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220116/1e7886ae/attachment.htm>
More information about the Tile-serving
mailing list