<div dir="ltr">Hey Grant,<div><br></div><div>Look into wmata-gtfsrealtime: <a href="https://github.com/kurtraschke/wmata-gtfsrealtime">https://github.com/kurtraschke/wmata-gtfsrealtime</a> which aims to solve the same problem for DC.</div>

<div><br></div><div>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.</div>

<div><br></div><div>Tom</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 22, 2013 at 10:13 AM, Grant Slater <span dir="ltr"><<a href="mailto:openstreetmap@firefishy.com" target="_blank">openstreetmap@firefishy.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi OSM-Dev,<br>
<br>
Dev challenge...<br>
<br>
I have a near live feed of bus positions for around 130 buses and<br>
(soon) all the passenger bus routes. Routes are relations in OSM.<br>
<br>
Does anyone have experience or firm suggestions on how best to match a<br>
live feed of bus positions to a set route?<br>
<br>
Feed Data:<br>
 * BusID (no direct match to route)<br>
 * Timestamp<br>
 * Position<br>
 * Travel Direction (Degrees)<br>
<br>
I also have 2 weeks worth of historical data.<br>
<br>
Typically:<br>
* Bus A will drive from depot to start of route 1 and loop on route 1<br>
all day... maybe route 4 tomorrow.<br>
* Bus B as above but does route 2 and then route 3...<br>
* Bus C will be deployed on any route as required.<br>
<br>
All routes may share a few short segments.<br>
<br>
Kind regards<br>
 Grant<br>
<br>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/dev" target="_blank">https://lists.openstreetmap.org/listinfo/dev</a><br>
</blockquote></div><br></div>