-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from brechtvdv/master
Step by step explination
- Loading branch information
Showing
1 changed file
with
21 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
# gtfs to linked connections | ||
# Guide: GTFS -> Linked Connections | ||
|
||
Transforms a GTFS file in memory towards a directed acyclic graph of "connections". | ||
This document explains how you can transform your own GTFS feed into "[connections](https://github.com/linkedconnections/arrdep2connections#2-a-connection-object)". | ||
|
||
Outputs connections as objects | ||
Note that the code in this repository is depreciated. | ||
|
||
## Use | ||
## Introduction | ||
|
||
Requirements: | ||
* node js | ||
A connection is the combination of a departure and its successive arrival of the same trip. | ||
Our goal is to retrieve a list of connections that is sorted by departure time, better known as a Directed Acyclic Graph. This way, routeplanning algorithms can be performed. | ||
|
||
Install using `npm install` | ||
First, we calculate two sorted lists: one for arrivals and one for departures. | ||
After that we can easily calculate connections out of these lists. | ||
|
||
### Command Line | ||
### Step 1: Calculate arrivals/departures | ||
The code and instructions are available at: | ||
https://github.com/brechtvdv/gtfs2arrdep | ||
|
||
```bash | ||
# First argument: path or url to gtfs | ||
./gtfs-csv2connections path-to-gtfs.zip > connections.ttl | ||
``` | ||
This process can take up a lot of memory when there are thousands arrivals/departures in a day. | ||
It is recommended to test your dataset by setting a startDate and endDate in step 3. | ||
|
||
This generates JSON-LD streams of arrivals and departures that you use in step 2. | ||
|
||
### Step 2: Calculate connections | ||
The code and instructions are available at: | ||
https://github.com/linkedconnections/arrdep2connections | ||
|
||
### Done | ||
With the retrieved JSON-LD stream of connections you can now setup your own [server](https://github.com/linkedconnections/server.js) and start experimenting with the [client](https://github.com/linkedconnections/client.js) and [Connection Scanning Algorithm](https://github.com/linkedconnections/csa.js). |