This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
projects:software:malaysia_gtfs_opentripplanner_onebusaway [2024/12/31 12:27] – [OpenTripPlanner] Andrew Yong | projects:software:malaysia_gtfs_opentripplanner_onebusaway [2025/01/01 07:25] (current) – placeholder for OneBusAway connection Andrew Yong | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Connecting Malaysia' | ====== Connecting Malaysia' | ||
- | FIXME This page is a work in progress. | + | ===== Problem Statement ===== |
+ | |||
+ | I recently moved to Kuala Lumpur, Malaysia and rely on public transportation as part of my daily commute. | ||
+ | |||
+ | ==== Wayfinding ==== | ||
+ | |||
+ | The Klang Valley has an extensive public transportation network. However, its planning is constrained physically and financially by the valley' | ||
+ | |||
+ | ==== Realtime Information ==== | ||
+ | |||
+ | The Klang Valley has [[https:// | ||
+ | |||
+ | Short of public transportation reform, I want to make best use of the level of service that is already there. | ||
+ | |||
+ | For example, the loop service (service 650) that serves my taman (estate, literally " | ||
+ | |||
+ | With such long headways, the wait for the bus becomes half of, or more, of the commute time; rather than giving up on public transportation, | ||
+ | |||
+ | ===== Existing Solutions ===== | ||
+ | |||
+ | === Maps === | ||
+ | |||
+ | * [[https:// | ||
+ | |||
+ | === Directions (Wayfinding), | ||
+ | |||
+ | * [[https:// | ||
+ | * Good: | ||
+ | * Wayfinding (directions) | ||
+ | * Bad: | ||
+ | * Live arrival times are not accurate | ||
+ | * Scheduled departure times are not accurate or missing entirely | ||
+ | * [[https:// | ||
+ | * Good: | ||
+ | * Live arrival times are accurate (±1-3 min) | ||
+ | * Scheduled departure times | ||
+ | * Bad: | ||
+ | * Constant and annoying full-screen advertisements (or monthly subscription) | ||
+ | * Live bus location | ||
+ | * [[https:// | ||
+ | * Good: | ||
+ | * Live arrival times are accurate (±1-3 min) | ||
+ | * Scheduled departure times | ||
+ | * Bad: | ||
+ | * Wayfinding (directions) | ||
+ | ===== ... And a Few New Problems ===== | ||
+ | |||
+ | ==== No Swiss Army Knife ==== | ||
+ | |||
+ | There is no //Swiss Army knife// app that does everything (wayfinding + schedules + arrival times) well without having some kind of catch. | ||
+ | |||
+ | **A new problem arises that multiple apps/ | ||
+ | |||
+ | ==== Closed Source + Ads ==== | ||
+ | |||
+ | Closed Source is probably a weak criticism to make, as are ads, since the GTFS datasets are huge and processing them is computationally (and thus financially) expensive. I think these solutions should exist for the general public who are willing to tolerate advertisements or pay to have an ad-free experience, at least, until a better option arises. After all, developers need to eat and earn a living wage, too. | ||
+ | |||
+ | But it is a problem to me because: | ||
+ | |||
+ | * Closed source means we cannot learn how the data is consumed, computed and presented, and philosophically I believe | ||
+ | * If I dislike ads and am willing to bear the cost of running my own infrastructure, | ||
+ | |||
+ | Furthermore, | ||
+ | |||
+ | ===== Building a Solution ===== | ||
+ | |||
+ | Given the lack of a comprehensive solution, and fully at risk of [[https:// | ||
+ | |||
+ | Even if I do not succeed (or get distracted by other commitments), | ||
+ | |||
+ | :!: This is a **living document** and the documentation below will continue to evolve as I try/ | ||
===== Malaysia' | ===== Malaysia' | ||
+ | |||
+ | Building a solution starts strong, because the [[https:// | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
- | |||
===== OpenTripPlanner ===== | ===== OpenTripPlanner ===== | ||
- | | + | > OpenTripPlanner (OTP) is an open source multi-modal trip planner, focusing on travel by scheduled public transportation in combination with bicycling, walking, and mobility services including bike share and ride hailing. |
- | - Download latest | + | |
- | | + | Instructions are written with [[https:// |
- | | + | |
- | | + | **Demo: https:// |
- | | + | |
- | * '' | + | ==== Preparation - Files ==== |
- | * '' | + | |
- | * '' | + | - **Create a working directory for OpenTripPlanner**, for this example, we will use '' |
- | - Download the latest | + | * '' |
- | | + | - **Create configuration files** |
- | - Build OpenTripPlanner graph:\\ '' | + | - **Build Configuration** to download regional OpenStreepMap data and GTFS data (GTFS are not the documented API links [[https:// |
- | - Run OpenTripPlanner | + | " |
- | * Docker:\\ docker run -it --rm -p 8080:8080 -v ./ | + | |
- | * Docker Compose: TODO | + | " |
+ | } | ||
+ | ], | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | - Router Configuration for Malaysia GTFS Realtime vehicle position feeds\\ <file json router-config.json> | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== Preparation | ||
+ | |||
+ | <file yaml compose.yaml> | ||
+ | opentripplanner: | ||
+ | command: --load --serve | ||
+ | environment: | ||
+ | - JAVA_TOOL_OPTIONS=-Xmx8G | ||
+ | expose: | ||
+ | - 8080 | ||
+ | image: opentripplanner/ | ||
+ | restart: unless-stopped | ||
+ | volumes: | ||
+ | - / | ||
+ | </ | ||
+ | |||
+ | ==== Build Graph ==== | ||
+ | |||
+ | * Docker Compose:\\ '' | ||
+ | | ||
+ | |||
+ | ==== Start OpenTripPlanner | ||
+ | |||
+ | * Docker | ||
+ | * '' | ||
+ | * '' | ||
+ | * Docker (foreground): '' | ||
+ | |||
+ | FIXME unfinished writing, a conclusion and some screenshots here would be nice | ||
+ | |||
+ | ===== Connecting to OneBusAway ===== | ||
+ | |||
+ | We will use OneBusAway as a mobile app frontend to OneTripPlanner. | ||
- | FIXME FIXME FIXME FIXME FIXME | + | FIXME unfinished writing, OneBusAway + OpenTripPlanner works on Android, but not iOS; there was [[https:// |