DEV Community

Cover image for Serve OS Open ZoomStack (2022-12) through PMTiles
Hidenori FUJIMURA
Hidenori FUJIMURA

Posted on

Serve OS Open ZoomStack (2022-12) through PMTiles

Step 1: Download MBTiles

curl -o zoomstack.mbtiles -L -C - "https://api.os.uk/downloads/v1/products/OpenZoomstack/downloads?area=GB&format=Vector+Tiles&subformat=%28MBTiles%29&redirect"
Enter fullscreen mode Exit fullscreen mode

Step 2: Convert MBTiles to PMTiles by go-pmtiles

pmtiles convert zoomstack.mbtiles zoomstack.pmtiles 
Enter fullscreen mode Exit fullscreen mode

zoomstack.mbtiles was 2.6GB and zoomstack.pmtiles was 2.4GB.

Step 3: Upload PMTiles file to a server.

I have uploaded it to https://x.optgeo.org/zoomstack.pmtiles. You can specify this URL at https://protomaps.github.io/PMTiles/ to see the view like the following. (Hint: Great Britain is around 50N in latitude and 0E in longitude.)

OS ZoomStack in PMTiles

Step 4: Create a demo site.

https://x.optgeo.org/zoomstack/

demo site

Attribution

Top comments (0)