Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mvexel/openstreetmap-vintage-tile-server
A Bash script to create a vintage OpenStreetMap tile server
https://github.com/mvexel/openstreetmap-vintage-tile-server
Last synced: 2 months ago
JSON representation
A Bash script to create a vintage OpenStreetMap tile server
- Host: GitHub
- URL: https://github.com/mvexel/openstreetmap-vintage-tile-server
- Owner: mvexel
- License: apache-2.0
- Created: 2022-01-30T20:21:29.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-28T20:58:54.000Z (4 months ago)
- Last Synced: 2024-10-21T23:08:14.049Z (2 months ago)
- Language: CSS
- Size: 224 KB
- Stars: 33
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# OpenStreetMap Vintage Tile Server
## [Demo server](https://osm.lol/)
**Please help support running costs of the demo server ($40/month, mostly storage cost)** Click the Patreon link on the right to learn more.
Ever long for the good old days when OSM was formless and void?
Now you can with a one-liner!
Well, almost:
## Prerequisites
This script has only been tested on a Linux (Ubuntu 21.10) machine.
You need [docker](https://docs.docker.com/engine/install/ubuntu/) and [osmium](https://osmcode.org/osmium-tool/manual.html) installed.
You need an OSM full history planet. You can obtain this from various [OSM planet mirrors](https://wiki.openstreetmap.org/wiki/Planet.osm#Planet.osm_mirrors), or for smaller regions (recommended!) from [Geofabrik](https://download.geofabrik.de/).
## Usage
Call the script with two arguments:
1. The full path to your history PBF
2. The 4-digit year you want tiles for*With a default Docker installation on Linux, you will need to run the script as root. Never run random things from the internet as root. Don't trust me. Inspect the script and trust it.*
`./osm-vintage-tile-server.sh /path/to/history.osh.pbf 2008`
This example will take `/path/to/history.osh.pbf`, create a 2008-01-01 vintage planet, set up a tile server with that data, and expose it at port 8008. (The port will be 6000 + the year you choose.)
## Bonus: Side By Side HTML
![](https://i.imgur.com/rp7L5eA.png)
To see the tiles from your new vintage server side by side with the live OSM tiles, you can use the HTML + JS included in the `html/` subdirectory. Just change the URL in [this line](https://github.com/mvexel/openstreetmap-vintage-tile-server/blob/main/html/index.html#L43) to point to your own server and load `index.html` in your browser.
This uses the [leaflet-hash](https://github.com/mlevans/leaflet-hash) and [leaflet-side-by-side](https://github.com/digidem/leaflet-side-by-side) plugins, which are included. Leaflet itself is loaded from a CDN.
## Credits
* [osmium](https://osmcode.org/osmium-tool/) takes care of time-slicing the full history planet. It continues to blow my mind how fast this tool is and how much it can do.
* The actual heavy lifting is done by the [openstreetmap-tile-server Docker image](https://github.com/Overv/openstreetmap-tile-server).