📖 Blogpost about this project (in German!): https://digital.ebp.ch/2024/11/25/dynamische-karte-mit-pmtiles-und-protomaps-erstellen/
Install Python, create venv and install dependencies:
python3 -m venv pyenv
pyenv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
Install system dependencies and tippecanoe:
sudo apt-get install gcc g++ make libsqlite3-dev zlib1g-dev
git clone https://github.com/felt/tippecanoe.git
cd tippecanoe
make -j
sudo make install
To extract the oneway GeoJSONs from the countries of Europe run:
python export_oneway_by_country.py
Generate PMTiles from GeoJSONs:
bash oneway_countries/generate_pmtiles.sh
mv oneway_countries/merged.pmtiles output/
Follow guide: https://docs.protomaps.com/guide/getting-started
-
Download Windows x86_64 release of pmtiles https://github.com/protomaps/go-pmtiles/releases
-
Check planet file
pmtiles show https://build.protomaps.com/20241111.pmtiles
- Create bounding box for europe with http://bboxfinder.com/
=> -24.785156,36.315125,36.914063,71.300793
- Extract europe
pmtiles extract https://build.protomaps.com/20241111.pmtiles europe.pmtiles --bbox=-24.785156,36.315125,36.914063,71.300793
mv europe.pmtiles output/
Download ca. 40GB PMTiles, use --maxzoom=14
to reduce size
Create a MinIO instance of fly.io (config in oneway-minio
directory), see README.
mc alias set oneway-minio https://oneway-minio.fly.dev <ROOT-USER> <ROOT-PASS>
mc put output/europe.pmtiles oneway-minio/onway-map
mc put output/merged.pmtiles oneway-minio/onway-map
For local testing, start a webserver that supports range-requests (needed for PMTiles):
python -m RangeHTTPServer 8000