Things I've learned, documented quickly
by arktronic
Some interesting links related to OpenStreetMap and raster/vector tiles:
osm2pgsql loads OSM data into Postgres + PostGIS. This, however, is no longer strictly necessary, due to newer vector generators that are able to ingest OSM PBF files directly.
Shortbread Vector Tiles is a lightweight vector tile spec. Used in conjunction with Planetiler, with Shortbread-specific configuration, you can output an MBTiles or PMTiles file. MBTiles files require a tile server such as Martin, while PMTiles files can be served directly, as long as the host supports HTTP Range requests. VersaTiles can then be used for styling the vector tiles, displayed in MapLibre GL or a compatible system.
After removing building-level data from an OSM Planet file, I was able to generate a 57GB PMTiles file of the planet. The process took just under 4 hours (!) on a virtual machine with 12 cores of an older Xeon CPU and 128GB RAM assigned to it. Planetiler is shockingly fast.
EDIT 2024-12-29: After inspecting the data in the PMTiles file, it appears to be incomplete, likely due to a misconfiguration of the Shortbread YAML directives. Switching to Planetiler’s default OpenMapTiles configuration increases processing time by maybe 30 minutes and increases the PMTiles file size to 62GB, but the resulting file is more readily usable with OpenMapTiles’ provided styles.
tags: osm - tiles - gis