[OSM-dev] How to get the order of bus stops in a bus route?

Jonathan-David SCHRODER jonathan.schroder at gmail.com
Wed Feb 10 12:52:33 GMT 2010


Hi,
I am designing aloud, what do you think of this :
i) 1 bus stop = 1 node
ii) 1 bus route from origin to destination = 1 relation containing : the
origin->destination route way + the bus stops nodes for this route ; those
stops may be a nodes of route way or nodes not contained in the route way
but close by enough.

Are there already any similar or different implementations of i) / ii) on
osm.org data ?

For ii) to work in path find algorithms, the latter should assume that an
ii) node separate from the route that's being considered, can be replaced by
the ii) node closest to the former separate ii) node.

For example, if we just want to display a polyline / sub-way of BR route
from A to B...
...here's one idea for a very simple use case where a user wants to go from
bus stop A to bus stop B, A & B on a same bus route BR.

1) starting node is A, destination node is B, directions steps is empty
   append A to directions nodes
   append B to directions nodes
2) directions finding, every following appending equals appending [A,
[here,...] ,B], without touching A and B :
   if A is not part of BR's way, then make the directions finding algorithm
origin point be the closest node to A on BR way that is also closest in
route distance to B; end if
   same for B, make algorithm's destination point be the closest node to B
on BR way that is also closest in route distance to A
3)   run directions algorithm's and append nodes if any.. calculate estimate
travel duration
4) display polyline / way made up of [A,...intermediate nodes..,B]

Jonathan

2010/2/10 Shuyan Chen <chenshuyan0221 at hotmail.com>

>  Dear all,
>
> I would like to get  the bus stops in order in a route for bus transit
> service ,including the bus route starting point and end point(bus station or
> terminus).
>
> Can anybody provide any ideas on how to achieve it? Thanks in advance.
>
> Regards,
>
> Shuyan
>
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20100210/845f291e/attachment.html>


More information about the dev mailing list