Start grabbing GTFS data from FGB files on the web #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #4. The approach is:
The "performance" is comically bad right now. Just the Elephant & Castle area triggers about 770 requests and sucks down 18MB. But not bad for a low-effort simple start!
The main missing thing is clipping; I'll try to add that now. Any trip intersecting the boundary area will have all stops included. So for part of central London, we wind up with stops very very far away:
This also messes up the routing.
Also before merging, I'll upload the FGB file and hook it up to the GH Pages demo... but maybe only if I can get the performance to be better, so I'm not burning through bandwidth ridiculously.
Encoding
What's in the FGB file exactly? Per "route variant", a linestring, with one point per stop. (The full route shape isn't included yet.) What's a "route variant"? In GTFS, "route 5" has many trips, some of them with potentially different sequences of stops (like an express / weekend / full service). To express a route geometrically, we need to decide the stops included, so we use the sequence of stops as the primary key.
For each of these route variants with a linestring, some JSON-encoded data: