News for hackers. Stuff that matters.
Re:Host your own OpenStreetMap Map Tiles by worldofmatthew on Tuesday August 30, 2022 @03:40AM (#32647680)
Would be much better if this involved hosting on a normal webserver, rather than requiring a specific one. Another piece of software to keep up-to-date, just for maps.
Re:Host your own OpenStreetMap Map Tiles by kylebarron on Tuesday August 30, 2022 @04:01AM (#32647829)
If you skipped the "convert to MBTiles" part, you could host it on a normal web server... the issue is that requires each tile to be a separate file, and copying hundreds of millions of tiny files is brittle, slow, and expensive. Having a specialized web server lets us use a more effective file format for the data.
Re:Host your own OpenStreetMap Map Tiles by paisleyrob on Tuesday August 30, 2022 @10:07AM (#32650664)
Having JUST done this for zoom level 12 for the planet it's tedious. It took 9 days, to export to mbtiles, another 2 days going through pngcrush, and about 40 minutes to make it into a squashfs resulting in a 2.6G squashfs file which houses the 22,368,460 PNG files which are then served up directly via nginx in our case.
Re:Host your own OpenStreetMap Map Tiles by hiram112 on Tuesday August 30, 2022 @12:49PM (#32652482)
It would be cool if somebody could crowd-source an EBS volume (or some other block storage) template of this that anybody else could easily attach to their cloud instance.
Re:Host your own OpenStreetMap Map Tiles by incanus77 on Tuesday August 30, 2022 @11:10AM (#32651396)
Indeed this is why MBTiles was created — especially for USB/device transfer and offline use.
Re:Host your own OpenStreetMap Map Tiles by akie on Tuesday August 30, 2022 @04:45AM (#32648062)
You can host .mbtiles files with PHP very easily. I wrote a tiny piece of code 9 years ago that I used for a high traffic map server and it worked just fine. https://github.com/infostreams/mbtiles-php

I'm sure there are newer solutions out there, which might have more features and are actually maintained. But this did (and still does) the job.

Re:Host your own OpenStreetMap Map Tiles by michaelt on Tuesday August 30, 2022 @04:22AM (#32647955)
The highest zoom levels are generally generated on demand, as there’s so many tiles.

Zoom level 20 is over a trillion tiles, most of them worthless blue sea tiles. We’re probably talking hundreds of terabytes just for the file system metadata, to say nothing of the tiles themselves.

Of course, you could forego the ability to zoom in very far.

Re:Host your own OpenStreetMap Map Tiles by Doctor_Fegg on Tuesday August 30, 2022 @06:24AM (#32648656)
With vector tiles you don't need to generate up to z20 - just to z14 is enough, and that can easily be done in a single .mbtiles (which is an SQLite database of vector tiles).
Re:Host your own OpenStreetMap Map Tiles by Doctor_Fegg on Tuesday August 30, 2022 @06:25AM (#32648661)
Here's a little bit of code I wrote that lets you host from a normal webserver, where that "normal webserver" is Apache: https://github.com/systemed/mod_mbtiles