[OSM-dev] Matching live bus position to route?

Tom MacWright tom at macwright.org
Tue Oct 22 14:17:28 UTC 2013


Hey Grant,

Look into wmata-gtfsrealtime:
https://github.com/kurtraschke/wmata-gtfsrealtime which aims to solve the
same problem for DC.

It's semi-impenetrable Java code but the jist is that you create a 'unit
space' (fancy word for distances in a bunch of dimensions) and use it to
calculate nearest-neighbor from real life bus to theoretical routed bus.

Tom


On Tue, Oct 22, 2013 at 10:13 AM, Grant Slater
<openstreetmap at firefishy.com>wrote:

> Hi OSM-Dev,
>
> Dev challenge...
>
> I have a near live feed of bus positions for around 130 buses and
> (soon) all the passenger bus routes. Routes are relations in OSM.
>
> Does anyone have experience or firm suggestions on how best to match a
> live feed of bus positions to a set route?
>
> Feed Data:
>  * BusID (no direct match to route)
>  * Timestamp
>  * Position
>  * Travel Direction (Degrees)
>
> I also have 2 weeks worth of historical data.
>
> Typically:
> * Bus A will drive from depot to start of route 1 and loop on route 1
> all day... maybe route 4 tomorrow.
> * Bus B as above but does route 2 and then route 3...
> * Bus C will be deployed on any route as required.
>
> All routes may share a few short segments.
>
> Kind regards
>  Grant
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20131022/80ad3566/attachment.html>


More information about the dev mailing list