Hello Kai, Am 14.04.2013 21:47, schrieb Kai Krueger: > > Perhaps I don't quite understand what you need, but does osm2pgsql not > already do this? >
osm2psql creates a way entry in the planet_osm_line table for each member of a route relation. The name tag of the relation is copied as route_name from planet_osm_rels to each of these ways, along with some other tags specific for hiking and cycling routes. This allows to render routes with simple query statements. With the hstore option (which I was not aware of before Shaun mentioned it) all the tags of the relation are stored in planet_osm_rels but not in the derived ways in planet_osm_line. To access these tags one had to build a query that goes through the member column values of the relations and gets the associated ways. This is a bit too complex for non-database geeks like me. One solution would be to add the osm_id of the relation to the derived ways. This would provide a not too complex way to query these ways along with data from the associated relation. This is easy to implement, in the same way I did for the name:xx tags. Another solution would be to have the tag value of the relation copied to all the derived ways when the hstore option is selected. I would prefer this solution but, as I wrote in my answer to Shaun, I am not able to implement it. Rainer _______________________________________________ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev