Live data from Hacker News

Host your own OpenStreetMap Map Tiles

altilunium.my.id

31–40 of 45 posts

Re: Host your own OpenStreetMap Map Tiles

#31

There is a project called Peermaps that is building a full P2P stack for OSM-based maps: They convert Planet OSM and Natural Earth OSM dumps into the storage format used by their geospatial DB [1] and then distribute them using P2P file storage tools like IPFS [3] or hyperdrive [4]. Because those storage tools make use of content addressing [5] and clever chunking [6], you can download only changes to the (converted)…

I'm a big fan of IPFS, but the "clever chunking" hasn't been very smart in my experience.

Peer maps seems to store the entire dataset in a single 107 GB file [1]

It's unclear to me that that eyros produces a file that doesn't change dramatically when data is inserted or removed.

It seems they are doing full imports, which likely means the output file could be completely different, meaning no shared chucks across generations.

In order to make IPFS actually create sharable chunks takes considerable effort, and is not as magically as their documentation and marketing would lead you to believe.

[1] https://bafybeidf5yn56cxk6zkyjmay4wigu2o7ynqh7q62z3kppag5v7j...

Re: Host your own OpenStreetMap Map Tiles

#32

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.

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.

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

#33

Is there a good way to host tiles for only a small part of the world? I have some apps that are only useful in my county - so I would like to have very detailed tiles for areas in my county, but there's no reason for me to generate or serve street-level tiles for somewhere in California or Tokyo or wherever. Because it's hard to lock down tile servers for public-facing apps, I have always been a bit nervous putting a…

Another option I've used, self-hosts vector tiles from an MBTiles database: https://github.com/akhenakh/kvtiles

Re: Host your own OpenStreetMap Map Tiles

#34
post #12

Wish you could self-host the tiles for your area in a tesla, say on USB.

Many car brands support that since many years. I think some cars had compact discs containing tiles. On my old BMW you can update the maps through USB. I rather get online maps with a cache to be honest.

Re: Host your own OpenStreetMap Map Tiles

#36

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.

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.

Indeed this is why MBTiles was created — especially for USB/device transfer and offline use.

Re: Host your own OpenStreetMap Map Tiles

#37

That's vector tiles, right? I'm still looking for an easy-ish way to render and host the old style of pixel tiles. Does anyone here have good pointers for that?

maplibre-gl-native can render vector tiles to the image format of your choice. tileserver-gl is a nodejs server which still uses the very old mapbox-gl-native but hopefully soon will use maplibre-gl-native to render raster tiles. It requires a mbtiles dataset (which you can either download from somewhere, or create yourself with Planetiler) and a map style. (like osm-bright)

Re: Host your own OpenStreetMap Map Tiles

#39

Thanks for sharing this! I have a hobby project that has hit the paid tier of my tileserver (thunderforest, and they're great) and I'm trying to figure out if I should be figuring out a business model or DIY'ing my tiles. Tileservers see to be expensive in general.

I had the same issue and was considering setting up my own tileserver. Fortunately I found www.tracestrack.com. Much less expensive that other options I considered and service has been good so far.

Thanks! This looks much more affordable.

Re: Host your own OpenStreetMap Map Tiles

#40

Earlier quoted context omitted.

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.

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.

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.
Post reply on HN