generate-shapes/README.md

118 lines
2.9 KiB
Markdown
Raw Normal View History

2018-06-09 15:15:05 +00:00
```
_-====-__-=-__-===-__-=======-__
_( _)
OO( )
. o '===-______-===-____-==-__-====='
.o
. ______ _______________
_()_||__|| __o^o___ | [] [] [] [] |
( | | | |o
/-OO----OO""="OO--OO"="OO---------OO"
############################################################
```
# pfaedle
Precise map-matching for public transit feeds.
## Requirements
* `cmake`
* `gcc`
2018-06-09 15:22:37 +00:00
* `libboost-system`, `libboost-filesystem`, `libboost-geometry`
2018-06-09 15:15:05 +00:00
## Building and Installation
Fetch this repository and init submodules:
```
2018-06-09 15:22:37 +00:00
git clone --recurse-submodules https://github.com/ad-freiburg/pfaedle
2018-06-09 15:15:05 +00:00
```
```
mkdir build && cd build
cmake ..
make -j
```
To install, type
```
make install
```
# General Usage
2018-06-12 10:52:43 +00:00
## Generating shapes for a GTFS feed
2018-06-09 15:15:05 +00:00
```
2018-06-12 10:52:43 +00:00
pfaedle -c <CFG FILE> -x <OSM FILE> <GTFS INPUT FOLDER>
2018-06-09 15:15:05 +00:00
```
A shape'd version of the input GTFS feed will be written to `./gtfs-out`.
2018-06-12 10:52:43 +00:00
A default configuration file `pfaedle.cfg` can be found in this repo.
2018-06-09 15:15:05 +00:00
By default, shapes are only calculated for trips that don't have a shape in the
input feed. To drop all existing shapes, use the `-D` flag.
2018-06-12 10:52:43 +00:00
## Generating shapes for a specific MOT
2018-06-09 15:15:05 +00:00
To generate shapes only for a specific mot, use the `-m` option. Possible
values are either `tram`, `bus`, `rail`, `subway`, `ferry`, `funicular`,
`gondola`, `all`.
Multiple values can be specified (comma separated).
## OSM filtering
`pfaedle` comes with the ability to filter OpenStreetMap data. If you specify
2018-06-12 10:52:43 +00:00
the `-X` flag, `pfaedle` will filter the input OSM file and output a new OSM
2018-06-09 15:15:05 +00:00
file which contains *exactly* the data needed to calculate the shapes for the
input GTFS feed and the input configuration.
This can be used to avoid parsing (for example) the entire world.osm on each
run.
## Debugging
The following flags may be useful for debugging:
2018-06-12 10:52:43 +00:00
* `-T <GTFS TRIP ID>` only calculate shape for a single trip (specified via its GTFS trip id) and output it as GeoJSON to
2018-06-09 15:15:05 +00:00
`<dbg-path>/path.json`
* `--write-graph` write the graph used for routing as GeoJSON to
`<dbg-path>/graph.json`
* `--write-cgraph` if `-T` is set, write the combination graph used for
routing as GeoJSON to `<dbg-path>/combgraph.json`
# Configuration
The main config file distributed with this repository is `pfaedle.cfg`. The
config file has some comments which hopefully explain the meaning behind the
parameters
# Evaluation
2018-06-12 10:52:43 +00:00
You may run an entire evaluation of our testing datasets Vitoria-Gasteiz, Paris, Switzerland and
2018-06-09 15:15:05 +00:00
Stuttgart with
```
mkdir build && cd build
cmake ..
make -j
make eval
```
*Note:* this will download, and filter, the entire OSM files for Spain and the
Stuttgart region. Make sure you have enough space left on your hard drive.
## Evaluation requirements
* zlib
On Debianesque systems, type
```
sudo apt-get install zlib1g-dev
```
2018-06-12 10:52:43 +00:00
to install the dependencies.