[OSM-dev] osm2pgsql patch for nested relations
Michael Heißmeier
michael63 at digital-filestore.de
Sat Feb 25 10:35:36 GMT 2012
Hi,
the current scheme for mapping public transportation
(http://wiki.openstreetmap.org/wiki/Proposed_features/Public_Transport) uses
nested relations. The primary information about a line (reference, operator
etc.) is stored in a master relation which contains relations for the different
directions or variants.
When osm2pgsql imports such relations it converts them into lines with all the
tags attached. But in this case the information from the master relation is not
forwarded. Several osm-based maps showing public transportation thus do no
longer show the line number along the route displayed (cf. the recent discussion
in German on
http://wiki.openstreetmap.org/wiki/Talk:%C3%96pnvkarte#Relations_aus_Routen) as
soon as people enter them according to the new scheme.
I dug into the sources and found a solution which is attached as a patch. As I
am certainly no expert in osm2pgsql's database handling I am open for any
comments. If a solution along these lines could be integrated (maybe guarded by
an option) this would restore the functionality of the maps mentioned without
inspiring people to attach all tags at all relations just to get rendering working.
--
Michael
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20120225/a3eff298/attachment.txt>
More information about the dev
mailing list