6 ms·
I totally recommend hosting your own tile-server using open street map if you have the resources. Creating your own tile-server is not as difficult as it may so
by spapas82 8y ago
I totally recommend hosting your own tile-server using open street map if you have the resources. Creating your own tile-server is not as difficult as it may sound however it is really resource intensive, especially if you want to cover large areas. For a single EU country it shouldn't be that resource intensive.
I have set it up on a Centos 7 server using more or less the instructions from here https://switch2osm.org/manually-building-a-tile-server-16-04-2-lts/ https://switch2osm.org/manually-building-a-tile-server-16-04... (yes they are for Ubuntu but you'll get the idea) and everything works great. Even if you don't really need it, I recommend trying it to understand how it works; it has some very intuitive ideas.
Beyond the tile server I am also proposing GeoServer (http://geoserver.org http://geoserver.org) for hosting the geo points on the maps (it can integrate with PostGIS and various other datasources and output the geo points in various different formats). You can then use Leaflet (https://leafletjs.com https://leafletjs.com) to actually display the map and points!
- linsomniac 8y agoTile generation wasn't THAT bad. We only cover Colorado and Wyoming, and generating the tiles for those at the zoom levels 5-18 takes around 7 hours to pre-render (using "render_list_geo.pl"). The end result is around 25GB of rendered meta-tiles. Much better than the NAIP aerial imagery, which takes around 3TB for the source data, 280GB for the resulting tiles, and around a full day to generate.
- linsomniac 8y agoOh, and we are using the mapbox.js viewer rather than leaflet.
- vinnieman232 8y agoMapbox.js is a leaflet extension to make it easier to use Leaflet with Mapbox services. So you're using both!
- spapas82 8y agoYes it wasn't bad for a single area (we cover only Greece and it was quick and easy for such a small country). However I couldn't imagine of the resources needed to cover the whole world!
- MattBlissett 8y agoThe fastest way, if you don't have resources and don't mind being up to a few months behind, is to use OpenMapTiles vector tiles [1]. The download is an SQLite database with a standard-ish structure (MBTiles), you can either write a small server or use theirs. I needed vector tiles in other projections — WGS84 equirectangualar, an Arctic one, and an Antarctic one. Generating those took many hours on a cluster. [1] https://openmaptiles.com/downloads/planet/ https://openmaptiles.com/downloads/planet/
- voxadam 8y agoYou mention being "a few months behind", what is the reason for this lag?
- MattBlissett 8y agoMy apologies, I'm out-of-date with the commercial offerings of OpenMapTiles — I work on an open data project, eligible for OpenMapTiles' free license which has old (currently one year old) tiles. With a commercial license, the tiles are from 2 July. I assume the commercial tiles are a few days behind as it's just not worth most people's effort to stay up-to-the-hour — different map services can offer that, this company is making easy self-hosted map tile packages. The free license is presumably using older data to encourage an upgrade.
- wpdev_63 8y agoIt's not comparable to OSM tiles as it's paid for licencing for commercial use.
- MattBlissett 8y agoThat's correct — I'd forgotten that, as my project has the open data use license. However, as an example, the one-time $40 for Colorado is likely to be much cheaper than generating them yourself, and is probably adequate if you don't need to keep up to date.
- spapas82 8y ago
- gregknicholson 8y agoWould it be possible to put Free map tiles in something like DAT or IPFS, to share the load? Kind of like Peertube, but for maps.
- diggan 8y agoFor sure, substack did this with peermaps + IPFS, check it out: https://peermaps.github.io/ https://peermaps.github.io/ Source: https://github.com/peermaps/peermaps https://github.com/peermaps/peermaps Also writeup about the architecture: https://github.com/digidem/osm-p2p-db/blob/master/doc/architecture.markdown https://github.com/digidem/osm-p2p-db/blob/master/doc/archit...
- rmc 8y agoIf you use vector tiles, and render them client side you could do this. For raster tiles, where you're storing images, there are too many images to do this practically. And then you need to think of how to do data updates. OSM updates minutely.
- spapas82 8y agoData updates are not required for many applications. You probably don't want to be google maps! For example I haven't updated the OSM data for more than a year and I don't think that there are any problems with the data being stale. It all depends on the application of course. One major advantage of not updating your data very often is that the tile-images won't need to be re-generated thus you save a lot of (CPU intensive) resources! I think that another commenter mentioned that he generated the tiles in a CPU intensive system and then just off-loaded the images to not-so-fast system for serving.