Subway Preprocessor and Validator
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Subway Preprocessor

Here you see a list of scripts that can be used for preprocessing all the metro systems in the world from OpenStreetMap. produces a list of disjunct systems that can be used for routing and for displaying of metro maps.

How To Validate

  • Download or update a planet file in o5m format (using osmconvert and osmupdate).
  • Use to extract a portion of data for all subways.
  • Run -x filtered_data.osm to build metro structures and receive a validation log.
  • Run on that log to create readable HTML tables.

Validation Script

There is a in the scripts directory. The author uses it for updating both the planet and a city he's working on. Here is an example of a script for updating the London Underground network:

export PLANET="$PLANET_PATH/london.o5m"
export HTML_DIR=tmp_html
export BBOX=-0.681152,51.286758,0.334015,51.740636
export CITY="London"
export DUMP=london.yaml


The bounding box can be found in the Google Spreadsheet.

This can be simplified by using the script, which fetches the bbox from the web:

scripts/ london.o5m London

If you are okay with rare updates, use this website.

Adding Stop Areas To OSM

To quickly add stop_area relations for the entire city, use the script from the stop_area directory. Give it a bounding box or a .json file download from Overpass API. It would produce an JOSM XML file that you should manually check in JOSM. After that just upload it.

Author and License

All scripts were written by Ilya Zverev for MAPS.ME. Published under Apache Licence 2.0.