[OSM-dev] osm2pgsql, direction of a virtual way (based on a route)

marqqs at gmx.eu marqqs at gmx.eu
Wed Oct 26 18:03:36 BST 2011

Hi Igor,

> are you sure? I thought one of the major goals of the _new_ PT schema 
> was precisely to eliminate this forward/backward mess with the "relation 
> per route variant" concept. Just looked it up [1]:

No, I'm indeed very unsure in aspects of the new schema.
If the ways don't have roles, the direction of the route will have to be determined based alone on the sequence of ways in the route.

A work-around would be to check the direction of the LineString right after its creation. Something like this:

IF the first noderef of the LineString is identical to the first or last noderef of the first referenced way of the underlying relation
THEN change the LineStrings direction

Right? Or am I wrong again? Please help...

More information about the dev mailing list