[Tile-serving] [osm2pgsql] Allow Unsuperseeded Way Tag Updates (#230)
Kevin Kreiser
notifications at github.com
Wed Dec 10 14:51:28 UTC 2014
During relations processing one has the option to mark members as superseeded/belonging/matching the given parent relation. When you do this any superseeded member that was added during way processing is deleted and the full geom of the relation is added back in using tag processing as a combination of the relation and the member ways. Essentially this allows one to pull tags from the members up to the relation and write out the relation. This makes for some duplication because often the members of a relation don't share the same tags for the full lenght of the relation.
I think it would be useful to allow users to "push" down tags from the relation on to each of the members of the relation that were already written to the db. Basically allow the `tagtransform::filter_rel_member_tags` to edit the tags on the members based on the relation and have those tags be written back out on the original ways. Currently we have the ability already to edit the tags they just don't get written back out.
My use case is as follows. I want to make a database that contains information useful for routing. Most of this information is readily avialable on the way. One thing that isn't are the tags needed for shielding/naming for numbered routes as well as their direction. This information exists in the relation's `name` and it's members' `role`s when the relation has `type=route` for example. In this case it would be really handy to be able to "push" tag and roles information from the relation into additional tags on each of the member ways.
To accomplish this in the code we could, in relation processing, loop over the superseeded information even if the relation was set to filter==1 and just make a call to the db for every way whose superseeded==0 to write that members keyvalues back out to the table. since the keyvalues are `tagtransform::filter_way_tags` filtered before doing so the lua you might write to "push" the tags down to the members would be just concentrated on what you are "pushing" down as well.
I may end up adding this on a branch and making a PR for this unless someone thinks its a poor idea or not worthwhile.
@pnorman @zerebubuth @lonvia @apmon what do you guys think?
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/230
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20141210/a128d394/attachment.html>
More information about the Tile-serving
mailing list