User Tools

Site Tools


terra4d:osmserver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
terra4d:osmserver [2023/11/22 07:10]
editor
terra4d:osmserver [2026/02/12 15:46] (current)
editor
Line 1: Line 1:
 ====== OpenStreetMap tile server ====== ====== OpenStreetMap tile server ======
 +
 +For a detailed instruction please check her: [[https://switch2osm.org/serving-tiles/using-a-docker-container/]]
  
 ===== Installation ===== ===== Installation =====
Line 10: Line 12:
   * Download the OSM data (.osm.pbf) from [[https://download.geofabrik.de/|GeoFabrik]] or similar service for the interested area   * Download the OSM data (.osm.pbf) from [[https://download.geofabrik.de/|GeoFabrik]] or similar service for the interested area
   * Import the downloaded .osm.pbf: <code>   * Import the downloaded .osm.pbf: <code>
-docker run +docker run \ 
-    -v /absolute/path/to/luxembourg.osm.pbf:/data/region.osm.pbf  +    -v /absolute/path/to/luxembourg.osm.pbf:/data/region.osm.pbf \ 
-    -v osm-data:/data/database/  +    -v osm-data:/data/database/ \ 
-    overv/openstreetmap-tile-server  +    overv/openstreetmap-tile-server \ 
-    import+    import 
 </code> </code>
   * Or download and import the dataset with one command (no extra download required):<code>   * Or download and import the dataset with one command (no extra download required):<code>
Line 24: Line 26:
     import     import
 </code> </code>
-  * 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 with [[https://docs.osmcode.org/osmium/latest/osmium-merge.html|osmium-merge]]: <code>+  * 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]]: <code>
 osmium merge washington.pbf oregon.pbf california.pbf -o westcoast.pbf osmium merge washington.pbf oregon.pbf california.pbf -o westcoast.pbf
 </code> </code>
-  * Finally start the tile server: <code>docker run  +      * using [[https://wiki.openstreetmap.org/wiki/Osmconvert#Parallel_Processing|osmconvert]]:  <code> 
-    --name osm-tile-server +osmconvert washington.pbf --out-o5m | osmconvert - oregon.pbf -o=westcoast.pbf 
-    -p 8080:80  +</code> 
-    -v osm-data:/data/database/  +  * Finally start the tile server: <code>docker run \ 
-    -d overv/openstreetmap-tile-server +    --name osm-tile-server \ 
 +    -p 8080:80  \ 
 +    -v osm-data:/data/database/ \ 
 +    -d overv/openstreetmap-tile-server \
     run     run
     </code>     </code>
  
  
 +
 +====== Styles ======
 +  * [[https://openmaptiles.org/styles/]]
 +
 +====== Internal documentation ======
 + * [[https://gitlab.fn.terra4d.de/gitlab/fastprotect/terra3d/-/wikis/OpenStreetMap]]
  
terra4d/osmserver.1700637021.txt.gz · Last modified: 2023/11/22 07:10 by editor