Design real-time data public transport routing architecture (client and server side) #5332

Open
opened 2023-06-13 15:11:18 +00:00 by dikkechill · 0 comments
dikkechill commented 2023-06-13 15:11:18 +00:00 (Migrated from github.com)

Ticket to design real-time transport routing architecture and related subtasks

OrganicMaps mostly functions offline and requires a connection for monthly map updates.

Currently public transport routing is in an experimental stage and uses GTFS static data.

  • The GTFS files are downloaded with a python script
  • GTFS files are converted with the gtfs_converter tool into JSON
  • The map generator combines the public transport JSON data with OSM data in .mwm files

With the current approach public transport data can only update with monthly map downloads.
However, routes and schedules change more often, trips are cancelled last minute or unforeseen events happen that cause delays.
OrganicMaps doesn't have this information, which leads to a sub-optimal user experience with possibly incorrect routing advice.

Describe the solution you would like

OrganicMaps can calculate the most optimal route based on the most recent available public transport information.

Ideally the solution allows the OrganicMaps client to update:

  1. more frequent than monthly (originally sourced from GTFS static feed, basically CSV based)
  2. real-time (e.g. 30 second interval) updates (originally sourced from GTFS real time feed, protobuf based)

To do this:

  • Server collects schedules from different sources. Efficient implementation in golang, rust or C++ is preferred for easier scaling and maintenance.
  • Different formats are converted to the universal one that can be read by Organic Maps and other clients to allow the following functionality:
    • Clients are periodically updating schedule info, that is cached on them and can be used offline, if there is no connection. With the connection real-time info is available.
    • Clients build routes from this schedule info offline.
    • To scale efficiently, this format should be compact and easily cacheable on HTTP CDN.

Describe alternatives you have considered

Additional context

_Ticket to design real-time transport routing architecture and related subtasks_ ## Is your feature request related to a problem? Please describe. OrganicMaps mostly functions offline and requires a connection for monthly map updates. Currently public transport routing is in an [experimental stage](https://github.com/organicmaps/organicmaps/blob/master/docs/EXPERIMENTAL_PUBLIC_TRANSPORT_SUPPORT.md) and uses GTFS static data. * The GTFS files are downloaded with a python script * GTFS files are converted with the gtfs_converter tool into JSON * The map generator combines the public transport JSON data with OSM data in .mwm files With the current approach public transport data can only update with monthly map downloads. However, routes and schedules change more often, trips are cancelled last minute or unforeseen events happen that cause delays. OrganicMaps doesn't have this information, which leads to a sub-optimal user experience with possibly incorrect routing advice. ## Describe the solution you would like OrganicMaps can calculate the most optimal route based on the most recent available public transport information. Ideally the solution allows the OrganicMaps client to update: 1. more frequent than monthly (originally sourced from [GTFS static feed](https://gtfs.org/schedule/), basically CSV based) 2. real-time (e.g. 30 second interval) updates (originally sourced from [GTFS real time feed](https://gtfs.org/realtime/), protobuf based) To do this: * Server collects schedules from different sources. Efficient implementation in golang, rust or C++ is preferred for easier scaling and maintenance. * Different formats are converted to the universal one that can be read by Organic Maps and other clients to allow the following functionality: * Clients are periodically updating schedule info, that is cached on them and can be used offline, if there is no connection. With the connection real-time info is available. * Clients build routes from this schedule info offline. * To scale efficiently, this format should be compact and easily cacheable on HTTP CDN. ## Describe alternatives you have considered - Use or cooperate with existing (open source) projects: - One interesting project is https://travic.app with [details on the architecture](http://ad-publications.informatik.uni-freiburg.de/theses/Master_Patrick_Brosi_2014.pdf) by @patrickbr - [Navitia open source project](https://github.com/hove-io/navitia) - [OpenTripPlanner](https://github.com/opentripplanner/OpenTripPlanner/) open source routing with OSM and GTFS (inc. realtime) data - Acquire data from external (commercial) provider Raises issues with data ownership and costs - E.g. [navitia.io data](https://navitia.io/en/nos-donnees/) - Use external routing service(s) Raises issues with privacy and connectivity - E.g. [Public Transport Enabler](https://github.com/schildbach/public-transport-enabler) ## Additional context - Curated list of public transport projects https://github.com/CUTR-at-USF/awesome-transit - [Google transit developer docs](https://developers.google.com/transit)
This repo is archived. You cannot comment on issues.
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#5332
No description provided.