pareshpawaskar / workshop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

workshop

Pre-reqs

  • Docker and Docker Compose
  • Download the data from Geofabrik, e.g. estonia-latest.osm.pbf from this page into data/ directory. (mirror)
  • Download latest martin release
  • Prefetch needed docker images
# You may need to use the older `docker-compose` command instead
docker compose -f dc-simple.yml pull
docker compose -f dc-with-db.yml pull

Run Planetiler to generate tiles

docker run \
    -e JAVA_TOOL_OPTIONS="-Xmx2g" \
    -v "${PWD}/data":/data \
    ghcr.io/onthegomap/planetiler \
    --download --area=estionia --minzoom=0 --maxzoom=14 \
    --osm_path=/data/estonia-latest.osm.pbf
    
# Fix permissions
sudo chown -R $USER:$USER data

# Rename output file for our demo
mv data/output.mbtiles data/estonia.mbtiles

On Windows (using powershell)

docker run `
    -e JAVA_TOOL_OPTIONS="-Xmx2g"   `
    -v "${PWD}/data":/data   `
    ghcr.io/onthegomap/planetiler   `
    --download --area=estionia --minzoom=0 --maxzoom=14   `
    --osm_path=/data/estonia-latest.osm.pbf

Serve tiles locally with Martin

martin data/estonia.mbtiles

Run Martin locally, and see if you can access the catalog and source info:

Run Martin with Docker Compose

Start Nginx proxy at port 8080, Martin, and Maputnik with Docker Compose. View it at http://localhost:8080

docker-compose -f dc-simple.yml up

Import data with osm2pgsql

docker network create dbnet
docker-compose -f dc-with-db.yml up db
docker-compose -f dc-with-db.yml up osm2pgsql

About

License:MIT License


Languages

Language:HTML 72.1%Language:Lua 27.9%