Skip to content

Commit

Permalink
Merge pull request #2 from brechtvdv/master
Browse files Browse the repository at this point in the history
Step by step explination
  • Loading branch information
Pieter Colpaert committed Sep 16, 2015
2 parents 313f671 + 53af732 commit 59b6d2e
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions README.md
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).

0 comments on commit 59b6d2e

Please sign in to comment.