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 19:54] – old revision restored (2024/12/31 19:45) 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 ===== |
- | Instructions below are written with Docker | + | I recently moved to Kuala Lumpur, Malaysia |
+ | |||
+ | ==== 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 is behind monthly subscription paywall | ||
+ | * [[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 | ||
+ | |||
+ | 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 in freedom of knowledge rather than be fully dependent on black boxes built by corporations | ||
+ | * 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. | ||
+ | |||
+ | Instructions are written with [[https:// | ||
+ | |||
+ | **Demo: https:// | ||
==== Preparation - Files ==== | ==== Preparation - Files ==== | ||
Line 18: | Line 93: | ||
* '' | * '' | ||
- **Create configuration files** | - **Create configuration files** | ||
- | - Build Configuration to automatically | + | - **Build Configuration** to download regional OpenStreepMap data and GTFS data (GTFS are not the documented |
- | " | + | |
" | " | ||
{ | { | ||
Line 27: | Line 101: | ||
" | " | ||
{ | { | ||
- | " | + | " |
- | " | + | " |
- | " | + | " |
}, | }, | ||
{ | { | ||
- | " | + | " |
- | " | + | " |
- | " | + | " |
}, | }, | ||
{ | { | ||
" | " | ||
- | | + | " |
- | | + | " |
}, | }, | ||
{ | { | ||
- | " | + | " |
- | " | + | " |
- | " | + | " |
}, | }, | ||
{ | { | ||
- | " | + | " |
- | " | + | " |
- | " | + | " |
}, | }, | ||
{ | { | ||
" | " | ||
- | " | + | |
- | " | + | |
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
} | } | ||
- | ] | + | ], |
+ | " | ||
} | } | ||
</ | </ | ||
- Router Configuration for Malaysia GTFS Realtime vehicle position feeds\\ <file json router-config.json> | - Router Configuration for Malaysia GTFS Realtime vehicle position feeds\\ <file json router-config.json> | ||
- | "transitModelTimeZone": | + | "updaters": [ |
- | "osm": [ | + | |
{ | { | ||
- | "source": "https:// | + | "type": "vehicle-positions", |
- | } | + | "frequency": "PT30S", |
- | ], | + | "url": " |
- | " | + | " |
- | { | + | |
- | "feedId": "mybas-johor", | + | |
- | "type": " | + | |
- | " | + | |
}, | }, | ||
{ | { | ||
- | "feedId": "ktmb", | + | "type": "vehicle-positions", |
- | "type": "gtfs", | + | "frequency": "PT30S", |
- | "source": " | + | "url": " |
+ | " | ||
}, | }, | ||
{ | { | ||
- | "feedId": "rapid-bus-kl", | + | "type": "vehicle-positions", |
- | "type": "gtfs", | + | "frequency": "PT30S", |
- | "source": " | + | "url": " |
+ | " | ||
}, | }, | ||
{ | { | ||
- | "feedId": "rapid-bus-mrtfeeder", | + | "type": "vehicle-positions", |
- | "type": "gtfs", | + | "frequency": "PT30S", |
- | "source": " | + | "url": " |
+ | " | ||
}, | }, | ||
{ | { | ||
- | "feedId": "rapid-bus-kuantan", | + | "type": "vehicle-positions", |
- | "type": "gtfs", | + | "frequency": "PT30S", |
- | "source": " | + | "url": " |
+ | " | ||
}, | }, | ||
{ | { | ||
- | "feedId": "rapid-bus-penang", | + | "type": "vehicle-positions", |
- | "type": "gtfs", | + | "frequency": "PT30S", |
- | "source": " | + | "url": " |
+ | " | ||
} | } | ||
] | ] | ||
- | }</ | + | } |
+ | </ | ||
==== Preparation - Docker Compose ==== | ==== Preparation - Docker Compose ==== | ||
Line 106: | Line 187: | ||
command: --load --serve | command: --load --serve | ||
environment: | environment: | ||
- | - JAVA_TOOL_OPTIONS=-Xmx8g | + | - JAVA_TOOL_OPTIONS=-Xmx8G |
expose: | expose: | ||
- 8080 | - 8080 | ||
Line 117: | Line 198: | ||
==== Build Graph ==== | ==== Build Graph ==== | ||
- | * Docker Compose:\\ '' | + | * Docker Compose:\\ '' |
* Docker:\\ '' | * Docker:\\ '' | ||
Line 127: | Line 208: | ||
* Docker (foreground): | * Docker (foreground): | ||
- | FIXME FIXME FIXME FIXME FIXME INCOMPLETE | + | 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 unfinished writing, OneBusAway + OpenTripPlanner works on Android, but not iOS; there was [[https:// |