My OSM vector tile script
I use the fantastic OpenMapTiles project to generate my OSM vector tiles. There’s nothing complicated or magical in my bash script I use to handle everything, but if you don’t bash, maybe it’ll be helpful.
I grab US South from Geofabrik, as it covers the extent I need, which I chop to size using osmconvert (available in the Arch User Repository if that applies to you). I drop the chopped PBF into the OpenMapTiles
data folder with the name
meck.osm.pbf, and then call
tiles.mbtiles file is ready, I use
scp to move it to a server under a temporary name to avoid down time while it uploads. Then I use
ssh to remotely swap the uploaded file into production (
osm.mbtiles). The previous tile set is retained until the next upload in case something terrible happened.
The MBTiles file is ~160MB, which for a multi-state area still blows my mind, and the whole process on my i3 desktop with 32GB of RAM takes 15-20 minutes, depending on how fast Time Warner is feeling.