====== OpenStreetMap tile server ====== For a detailed instruction please check her: [[https://switch2osm.org/serving-tiles/using-a-docker-container/]] ===== Installation ===== * Set up and install linux server; we recommend an Debian or Ubuntu LTS server installation * Install Docker CE to the server * [[https://docs.docker.com/engine/install/ubuntu/|Ubuntu]] * [[https://docs.docker.com/engine/install/debian/|Debian]] * Check the documentation of the [[https://hub.docker.com/r/overv/openstreetmap-tile-server|openstreetmap-tile-server docker image]] * Create a docker volume for the OSM data: docker volume create osm-data * Download the OSM data (.osm.pbf) from [[https://download.geofabrik.de/|GeoFabrik]] or similar service for the interested area * Import the downloaded .osm.pbf: docker run \ -v /absolute/path/to/luxembourg.osm.pbf:/data/region.osm.pbf \ -v osm-data:/data/database/ \ overv/openstreetmap-tile-server \ import * Or download and import the dataset with one command (no extra download required): docker run \ -e DOWNLOAD_PBF=https://download.geofabrik.de/europe/luxembourg-latest.osm.pbf \ -e DOWNLOAD_POLY=https://download.geofabrik.de/europe/luxembourg.poly \ -v osm-data:/data/database/ \ overv/openstreetmap-tile-server \ import * The processing can take a long time (depending on assign/used CPU/disk/memory). The processing of Italy (about 2G of PBF data) takes about 2 hours. * Note: The import is limited to one dataset (one pbf file). If you need more than one country/dataset you have to combine the datasets first, there are two options: * using [[https://docs.osmcode.org/osmium/latest/osmium-merge.html|osmium-merge]]: osmium merge washington.pbf oregon.pbf california.pbf -o westcoast.pbf * using [[https://wiki.openstreetmap.org/wiki/Osmconvert#Parallel_Processing|osmconvert]]: osmconvert washington.pbf --out-o5m | osmconvert - oregon.pbf -o=westcoast.pbf * Finally start the tile server: docker run \ --name osm-tile-server \ -p 8080:80 \ -v osm-data:/data/database/ \ -d overv/openstreetmap-tile-server \ run ====== Styles ====== * [[https://openmaptiles.org/styles/]] ====== Internal documentation ====== * [[https://gitlab.fn.terra4d.de/gitlab/fastprotect/terra3d/-/wikis/OpenStreetMap]]