Generate transit maps from OSM data in docker
Table of Contents
About The Project
There are many great public transport routing services online, however, I stil need static maps of public transit lines. I want to create a automatic process for generate static maps from OpenStreetMap data, with simply running routine.
- Changes of public transport lines become quickly, but transit authorities news resourses do not provide up-to-date maps, only text descriptions.
- Public transport routing services solve one problem: how to get to specific address. A map of all lines solve diffirent problem: where i can go from some point.
- Old maps may disappear from Internet, due to closed licensing, and no one can copy it. A maps generated from OpenStreetMap keep open license, and can be reproduced to many resources.
- Public Transport lines information in OSM keeps from 2010-s, so historical map generation already possible.
A data features, needed to orientation by static public transport map is
- Geometry of lines, with route refs
- Places of terminus, with route refs and names.
- Directions for one-line lines.
- Interval information, or marking of low interval lines.
- Date of map source.
- Good looking basemap withouth distracting map features, like "boundary of national parks".
This scripts provive points 1, 2, 3, calculating from OSM data. And also 5 and 6.
This section should list any major frameworks that you built your project using. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
This repository uses submodules, so you need to
git clone --recurse-submodules https://github.com/trolleway/OSMTram.git
This is a docker container. It uses for input a bbox, filter string and map style, and generate a png image file.
It consists from there scripts:
- dump_prepare.py - Takes a url or pbf file, poly file, filter string, and filtering it to basemap.pbf and pt_data.pbf. Use osmfilter.
- historical_dump.py - Download and prepare historical dump for dump_prepare. May will be run outside container, due to huge size of dumps. Use osmupdate and osmfilter.
- basemap_process.py - Generate image of basemap for bbox. Importing basemap.pbf to postgis, create QGIS Server WMS, make png from WMS.
- pt_data_process.py - Generate image of public transport map for
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
For more examples, please refer to the Documentation
Distributed under the MIT License. See
LICENSE for more information.
Project Link: https://github.com/your_username/repo_name