Schematic Mapping Workshop - Activity

Play around with pfaedle, gtfs2graph, topo, loom, octi, and transitmap.

How to get the tools

All tools can be checkout our from Github: pfaedle and LOOM tools

You can either build them manually, or install them via Docker.

To build them manually, you need to install cmake and gcc (or clang).

The installation of both repositories is the same:

mkdir build
cd build
cmake ..
make -j4 install

After that, you should have the tools pfaedle, gtfs2graph, topo, loom, octi, and transitmap available.

Test it as follows:

pfaedle --help

To install the LOOM suite via Docker, type

docker build -t loom

The call of each tool must then be preceeded by docker run -i loom.

There is also a Docker image for pfaedle.

Ideas for activities

0. TLDR

If you just want to start rendering maps and play around with parameters, use the example input graphs provided here and go to step 7.

1. Find shapes for the Freiburg network

We provided a GTFS dataset of Freiburg here and OSM data for the Freiburg region here

Extract it to some folder:

unzip VAGFR.zip -d gtfs

You can already have a look at the contained graph, e.g. for trams:

gtfs2graph -m tram gtfs > raw.json

You can have a look at raw.json in QGIS - or you can already render it as an SVG file using transitmap:

transitmap < raw.json > map.svg

To find the missing geographical line courses (shapes) with pfaedle, use

pfaedle -x freiburg.osm gtfs

A new GTFS feed should now have been written to gtfs-out, and you can look at it again as described above.

Can you extract a graph for the bus network?

2. Generate a clean graph from the data

Give the raw.json file from above to the topo tool:

topo < raw.json > topo.json

You can again look at it via QGIS or with the transitmap tool.

What happens if line turn restrictions are not inferred (via the options --no-infer-restrs)?

3. Find optimal line orderings with the loom tool

loom < topo.json > opt.json

You can for example play around with different optimization strategies via the -m parameter. A fast method is greedy-lookahead. You can also disable the line graph simplification and view the resulting orderings by adding --no-untangle --no-prune.

4. Experiment with different layouts

Octilinear:

octi < opt.json > octi.json

Hexalinear:

octi -b hexalinear < opt.json > octi.json

Orthoradial:

octi -b orthoradial < opt.json > octi.json

5. Experiment with approximating geographical line courses

octi --geo-pen 5 < opt.json > octi.json

6. Experiment with labels and line widths

Example of a map fully labeled with thicker lines:

transitmap -l --station-label-textsize 120 --line-label-textsize 120 --line-width 40 --line-spacing 20 --line-label-textsize 120  < octi.json > freiburg.svg 

7. Other datasets

You can play around with other (already extracted) graphs from here

There are already topological, so you don't need gtfs2graph or topo.

Render a map of Stuttgart:

cat stuttgart.json | octi -b orthoradial | transitmap -l --station-label-textsize 120 --line-label-textsize 120 --line-width 40 --line-spacing 20 --line-label-textsize 120  < octi.json > freiburg.svg