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

Frederik Ramm frederik at remote.org
Wed Oct 26 15:52:43 BST 2011


Hi,

On 10/26/11 16:27, marqqs at gmx.eu wrote:
> I'm wondering how osm2pgsql determines the direction of a route.
> Has the order of way-refs in the route relation influence on that?

osm2pgsql takes all the ways making up the route relation and throws 
them into the GEOS LineMerge operation, documented here:

http://geos.refractions.net/ro/doxygen_docs/html/classgeos_1_1operation_1_1linemerge_1_1LineMerger.html

The result is a number of LineString geometries (at least one, at most 
the number of relation members).

The direction of each resulting LineString should be the direction of 
the majority of constituting ways.

> Are role tags "forward" and "backward" evaluated?

Not at all.

Bye
Frederik




More information about the dev mailing list