This project is used to setup OTP data. It downloads OSM and NeTEx files, filter them and copy the otp config files into the setup.
The config files should be maintained and kept up to date with the Entur config for the OTP deployment.
The main script is written in Kotlin, but a few terminal commands are executed from the
Kotlin code. So you need osmium and wget.
- Clone this Git repo
- Install
osmium. This is used to filter the OSM file using the geojson. - Install
wgetor add support forcurl. Used to download files (OSM and NeTEx).
I added a Swing UI (yes it old) to run this instead of a cli. Add a cli if you prefer that.
-
Run
org.entur.otp.setup.Main -
Select the setup configuration you want and witch files (OSM/NeTEx/config), and push run.
🎯 Note To avoid spending time on downloading the norway-latest.osm.pbf the script check the timestamp on the file and downloads it automatically if it is older than 14 days.
- Add a new row in the cases.txt
- Use https://geojson.io/ to create a GEOJSON to use for filtering OSM data. Put the geojson
file in the
geojsondirectory. Give a descriptive name. If no GoeJson file is provided, the setup script will generate a link to the norway-latest.osm.pbf in the target directory. - The
src/main/config.ktcontains the configuration for the download locations. GTFS is not supported, but should be easy to add.
Search and delete transit data, osm, config, graph and report files recursively in a target dir.
$ ./otp-clean --help
