There was an error while loading. Please reload this page.
Document stop direction inference as a shared algorithm Eight endpoint pages described data.*.direction as a bare GTFS passthrough ("absent when the feed does not supply it"), but both legacy Java (GenerateNarrativesTask.computeStopDirection) and Maglev (AdvancedDirectionCalculator) infer a direction from shape geometry when the feed omits one, using the same vector-averaging algorithm and the same 0.7 standard-deviation rejection threshold. Traced and cited the Java source directly rather than assuming Maglev's behavior was novel. Added Stop-Direction-Calculation.md as a single source of truth for the algorithm (legacy steps, Maglev's port, and the one confirmed intentional deviation: an epsilon-based near-zero check replacing Java's largely-inert exact == 0.0 comparison), and pointed every affected page at it instead of duplicating the explanation. Linked from OBA-API-Specs.md under a new Shared Algorithms section. Affected pages: stop, stops-for-agency, search-stop, stops-for-location, stops-for-route, arrival-and-departure-for-stop, arrivals-and-departures-for-stop, trips-for-location. block/{id} also calls the same code path but has no wiki spec page yet.