- http://openstreetmap.by web site
- OSM data with updater
- postgres data update based on
osm2pgsql
- vector tiles update based on
openmaptiles
- postgres data update based on
Since 2020 OpenStreetMap.by runs on 64Gb RAM and 2x512 SSD server at https://www.hetzner.com and costs @Komzpa 40.80 EUR monthly.
- clone repo
git clone https://github.com/osm-by/OpenStreetMap.by.git
- init submodules
git submodule update --init --recursive
that initializeopenmaptiles
- run
install.sh
- make sure that you have all required packages - run
updater/update.sh belarus
- fetch and prepare data:- download latest osm dump for belarus
- update postgis database with
osm2pgsql
- generate mbtiles for Belarus 0-14 zoom levels
- unpack mbtiles to filesystem to allow serve it by nginx.
- download, patch and prepare vector tiles styles
- download and prepare vector tiles fonts
- download and prepare vector tiles data info
- if you want to generate planet tiles too (take time and disk space), then run
updater/update.sh all
orupdater/update.sh planet
- check that
.env
contains good for your configuration - run
docker-compose up -d nginx
runnginx
and all required services locally.
production: updater:
1. serve fonts/styles from disc 1. serve fonts/styles from tileserver
2. serve belarus from disk 2. serve belarus tile from tileserver
3. serve planet from martin 3. no planet tiles serve
nginx nginx
| |
--------------------------------- --------------------------
| | | | | | |
static---webapp | martin static---webapp tileserver
| | | | |
---------- ----------- ---------- |
| | | | | |
redis postgis tiledata redis postgis tiledata
| | | |
=================+===========+======== ================+==========+=====
| | | |
------------- ------------
| |
updater updater
NOTE: tileserver can be replaced with serving tile data as standard static data serving by nginx.
redis
store only untranslated text keys.
postgis
provide osm2pgsql
schema and used for read only purpose.
See details in docker-compose.yml
.
belarus-latest.osm.pbf
- osm dumpbelarus.mbtiles
- mbtiles generated for Belarus osm dump zooms 0-14planet.mbtiles
- mbtiles generated for planet overview zooms 0-14belarus/
- vector tiles for Belarus osm dump zooms 0-14 unpacked frombelarus.mbtiles
data/
- vector tile data infostyles/
- styles for vector tiles renderingfonts/
- fonts used by styles for vector tiles rendering
tiledata
directory fully populated with updater/update.sh
script.
Most of this data server by nginx
, see details in nginx/openstreetmap.by.conf
.
Used bright style as default with next modifications:
- removed
water-pattern
style layer. - added
housenumer
style layer for zooms 15+ (based on basic stylehousenumber
layer) and expressions.
As part of the styles used appropriate fonts.
See https://github.com/osm-by/openmaptiles (slightly modified fork of https://github.com/openmaptiles/openmaptiles).
git clone https://github.com/osm-by/openmaptiles.git
cd openmaptiles
python3 -m venv venv
. venv/bin/activate
pip install docker-compose
./quickstart.sh belarus
See https://github.com/maptiler/tileserver-gl.
docker run --rm -it -v $(pwd)/data:/data -p 8081:80 maptiler/tileserver-gl