2.0.0 • Published 5 years ago
generate-vbb-graph v2.0.0
generate-vbb-graph
Generate a JSON graph from Berlin & Brandenburg public transport Writes a JGF file. See vbb-graph for published prebuilt data.
Installing
npm install -g generate-vbb-graphUsage
Usage:
generate-vbb-graph [-p subway,tram]
Options:
--products -p A list of products. These are available:
suburban, subway, regional, tram, ferry, bus
--projection -P Wether and how to project the station coordinates.
See juliuste/projections for details.
--simple-lines -s Use a heuristic to keep only the most "canonical"
variant of each line. Default: false
--simple-deduplication -d Deduplicate edges without taking the travel
time into account. Default: false
--lines-blacklist -b Apply a blacklist of weird lines. Default: false
Examples:
generate-vbb-graph -p subway,tram -P mercatorThis tool generates data in the JSON Graph Format. Note that instead of storing all nodes and edges in one JSON file, it will create nodes.ndjson and edges.ndjson. These are ndjson-encoded lists of all nodes and edges, respectively.
A node from nodes.ndjson looks like this:
{
"id": "900000029101",
"label": "S Spandau",
"metadata": {
"x": 536.66,
"y": 326.25
}
}An edge from edges.ndjson looks like this:
{
"source": "900000100001",
"target": "900000003201",
"relation": "regional",
"metadata": {
"line": "RB22",
"time": 180
}
}Contributing
If you have a question, found a bug or want to propose a feature, have a look at the issues page.