50: PMTiles Turns a Directory of a Million Files Into a Single API

Share

Most teams hosting vector tiles still run a server. They don’t need to. PMTiles is a single-file archive that acts like an API, requiring nothing but static hosting.

PMTiles consolidates millions of z/x/y tile files into one container. Instead of storing 14/234/512.pbf, 14/234/513.pbf, and 9,999,998 others as individual files, you wrap them all into tiles.pmtiles. A browser requests a specific tile, and PMTiles serves the exact bytes it needs via HTTP Range Requests.

The efficiency is brutal. Individual tile files create inode exhaustion on S3—slow uploads, slow deletes, wasteful metadata overhead. PMTiles stores one object. Deduplication shrinks files dramatically: if the ocean is the same tile repeated 100,000 times, PMTiles stores it once and references it logically many times. A planet-scale map archive shrinks by 30-50%.

Access pattern: the client (MapLibre, Leaflet) reads the PMTiles header (a few kilobytes), learns that tile 14/234/512 lives at bytes 500–1,200, and fetches just those bytes. No server. No running backend. Just HTTP.

Compare to MBTiles—a SQLite database requiring a Node server or PHP backend to read. Or individual tile files—millions of objects on S3 costing egress and management overhead.

Generation is straightforward: tippecanoe -o tiles.pmtiles input.geojson. Upload to S3, enable CORS, done.

The rule: If your map doesn’t change every minute, kill the server. A static PMTiles file on a CDN outscales and outlasts any infrastructure you’d build to serve it.

Whenever you’re ready, here are 4 ways I can help you grow in GIS & spatial data:

​Spatial Lab​ – My private community where GIS professionals, data engineers, and analysts connect, swap workflows, and build repeatable systems together.

​Modern GIS Accelerator​ – A guided program to help you break out of legacy GIS habits and learn modern, scalable workflows.

​Career Compass​ – A career-focused program designed to help GIS pros navigate the job market, sharpen their pitch, and find roles beyond traditional GIS paths.

​Sponsorship​: Interested in sponsoring this newsletter (or other content)? ​Learn more here​ and fill out the form to get in touch!

#49: Your Software Thinks in Pixels, But Your Hard Drive Thinks in Blocks

Prev

#51: You Don’t Choose Between Vector Tiles and PMTiles

Next
Comments
Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Get every update, in your inbox.
Get every update, in your inbox.
Get every update, in your inbox.
One tip, every day
Get every update, in your inbox.
Subscribe below and join 11,000+ others learning modern GIS.