A skeleton to start custom vector tile development from OpenStreetMap. It contains an example mapping and source definition for buildings.
The entire project is structured components using Docker containers to work together. Ensure you meet the prerequisites.
- Install Docker
- Install Docker Compose
Start up the PostgreSQL database with the PostGIS extension.
docker-compose up -d postgresNow download a OSM PBF extract and store it in the ./data dir.
wget -P ./data https://s3.amazonaws.com/metro-extracts.mapzen.com/zurich_switzerland.osm.pbfImport the OSM PBF.
docker-compose run import-osmImport the required database schema (views, prepared tables and helper functions).
docker-compose run db-schemaExport the vector tiles for the planet.
docker-compose run export-vectortilesTo visualize and work with the vector tiles you can spin up Mapbox Studio
in a Docker container and visit localhost:3000.
Then open the vector tile source with Browse and choose from /projects/vector-datasource.tm2source.
docker-compose up mapbox-studio