[Tile-serving] [osm2pgsql] Allow propagating tags to ways during relations processing (#230)

Sarah Hoffmann notifications at github.com
Thu Dec 11 21:46:31 UTC 2014


I'm not sure I've understood you right. I thought way processing worked like this with respect to multipolygons: in the first round of reading ways that potentially belong to a multipolygon are held back from writing in to the final planet_osm_line tables and just marked as to be done (TBD) in the middle tables. Then relations are processed and they delete the TBD flags for ways which are part of a multipolygon and therefore are not independent. Afterwards the TBD ways are processed and inserted in planet_osm_line. 

There is no actual deleting (just unflagging) and it should be much easier to plug into this mechanism for what you want: make sure all ways that can potentially inherit relation tags are marked as TBD (currently that happens, when the way is marked as polygon[1](https://github.com/openstreetmap/osm2pgsql/blob/master/output-pgsql.cpp#L424), so you might need an additional flag, as 'polygon' and TBD would become independent properties). Then in the postprocessing[2](https://github.com/openstreetmap/osm2pgsql/blob/master/output-pgsql.cpp#L122) look up for each way where it is a member of and hand the relation tags (or a list of them, if there are more relations the way is a member of) into the tag transform.

Does that make sense to you? If you employ some clever in-memory caching of relation tags (possibly filtering the relations you are actually interested in), then this isn't necessarily slowing down anything.

NB: this feature request comes up from time to time, in particular for route relations.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/230#issuecomment-66694836
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20141211/6c254df3/attachment.html>


More information about the Tile-serving mailing list