Fast and Easy public transport network prototyping
Check out the Demo »
Report Bug
·
Request Feature
·
Send Feedback
Table of Contents
Its main purpose is to prototype public transport lines on the open field, analyse the station coverage and find the optimal station position.
The tool allows to save configurations fast and export all results to a printable pdf.
It is build to be extendable and easy to adjust, to be applicable in different scenarios.
This project was build with:
And deployed with:
OpenLinePlanner allows you to
... load OpenStreetMap data for any region on demand
... draw schematic transportation lines on map
... name lines and stations
... give a custom color to each line
... analyse coverage area of stations
... export map and analysis as PDF
... automatically locate new stations, based on predicted demand
By default OpenLinePlanner is configured to show the absolute amount of residences living in the coverage area of each station. Every person in the influence radius of the station (default 500m) is rated with the weight of 1. i.e. if 200 people life in the influence are the result is a score of 200
Alternatively a relative measurement can be applied (Settings). This approach takes the distance between station and the home of a potential passenger into account:
// Calculation methods:
absolute: 1;
relative: 1 / sqrt(distance);If your scenario requires adjusted parameters please reach out! (Contact via Email) Further adjustment dialogs are planned to be implemented if requested.
This is a short guide to setup your own development environment of OpenLinePlanner.
- To start of clone the Repo:
$ git clone https://github.com/TheNewCivilian/OpenLinePlanner.git
The backend needs osmtogeojson on the PATH, which it uses to convert Overpass responses:
$ npm install -g osmtogeojson-
Build backend
$ cd openlineplanner-backend $ cargo build --release -
Optionally add a
Config.tomlnext to the working directory to override the defaults:[cache] # persisted layers and the cached region catalog dir = "./cache/" [data] # preprocessed `<osm_area_id>.map` files dir = "./data/" # scratch space for downloads, cleaned up after each import download_dir = "./data/tmp/" # keep the downloaded .pbf instead of deleting it keep_downloads = false [catalog] # where the list of downloadable regions comes from url = "https://download.geofabrik.de/index-v1.json"
Environment variables:
Variable Default Description CORS_ALLOWED_ORIGINShttps://openlineplanner.com,https://test.openlineplanner.comComma-separated browser origins allowed to call the API. Must list the host the frontend is actually served from. NOMINATIM_API_URLhttps://nominatim.openstreetmap.orgBase URL of the Nominatim instance used to look up administrative boundaries. NOMINATIM_MIN_INTERVAL_MS1100Minimum spacing between Nominatim requests. Set to 0for a self-hosted or commercial endpoint.CORS.
CORS_ALLOWED_ORIGINSmust name the origin the frontend is served from -- scheme included, no trailing slash -- or the browser blocks every call. Loopback origins are always allowed on any port, and debug builds are permissive entirely.Boundary lookup. Administrative boundaries come from Nominatim reverse geocoding, at zoom 12 (municipality or city district, OSM
admin_level8 or 9) and zoom 10 (the enclosing city), deduplicated and returned smallest first. Requests retry transient failures twice with a 1s/2s backoff.nominatim.openstreetmap.orgis a free community service capped at one request per second.NOMINATIM_MIN_INTERVAL_MSenforces that spacing process-wide; only lower it for an instance you run or pay for.A replacement instance must carry global data. Regional mirrors answer
200with an empty result set outside their coverage, which shows up as a misleading "No administrative areas found here" rather than an error. -
Install backend binaries
$ cargo install --path . -
Startup Backend
$ openlineplanner-backend
No data files need to be prepared by hand. On first start the data directory is empty; load a region from the frontend as described below.
Open the frontend and use Load region data in the data view (it is also offered on the welcome screen when nothing is loaded yet). Search for a place, pick an administrative area, and confirm the download.
The backend then downloads the smallest OpenStreetMap extract that covers your area, derives residences from it with OpenHousePopulator, trims everything outside the area, and stores the result as <osm_area_id>.map in data.dir. That file is what the planning views read from afterwards, so each area only has to be imported once.
Two things worth knowing:
- The download can be large. An extract always covers more than your area — a district in Vienna pulls the whole Austria extract (~800 MB) — and the confirmation step shows the size before anything starts. Parsing it needs a few GB of memory.
- An area that straddles two extracts resolves to the larger parent extract that contains both, which can mean a much bigger download. Picking an area that sits inside a single country keeps this small.
For seeding many areas at once (for example when hosting an instance), tools/regionalextracts still does the same work offline for a whole .pbf, splitting it along administrative boundaries with osmium. Its output belongs in the same data.dir.
All environment variables are automatically loaded by VITE from the available .env files. If you need to adjust ports or endpoints check these files.
- Install all NPM packages
$ yarn
- Start development server
$ yarn dev
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make OpenLinePlanner better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". If this project brings you any value or inspires you don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the GNU GPL V3 License. See LICENSE.txt for more information.
Email: hi@xatellite.space
Project Link: https://github.com/xatellite/OpenLinePlanner
The following pages and resources have been very helpful in the creation of the project:
- README Template - @OthneilDrew
- Choose an Open Source License - @ChooseaLicense
- Img Shields - @ShieldIO
This project was created as part of the interdisciplinary project of the master class Rail Technology and Management of Railway Systems @FH-St.Pölten.





