8 ms·
Most production raster tile systems use osm2pgsql + Mapnik. These are not easy to install. You may need to generate two or three sets of raster tiles for differ
by bdon 6y ago
Most production raster tile systems use osm2pgsql + Mapnik. These are not easy to install. You may need to generate two or three sets of raster tiles for different pixel densities. The total number of tiles will explode past around zoom level 15. https://switch2osm.org https://switch2osm.org is a good intro.
The newer way to do raster tiles is to actually generate vector tiles first, and then do the rasterization dynamically. Mapnik can do this, renderers like MapboxGL can be run in headless mode to do this as well.
Yes, I wish this was easier too.
- berkes 6y agoIn addition, modern browsers can display vector tiles directly. Mobile and apps have a somewhat harder time with this. https://www.maptiler.com/ https://www.maptiler.com/ has a good introduction for this wrt Open Street Map.
- bdon 6y agoVector tiles with OpenLayers doesn't feel as smooth to me compared to MapboxGL or Tangram https://openlayers.org/en/latest/examples/mapbox-style.html https://openlayers.org/en/latest/examples/mapbox-style.html but it seems to be improving rapidly.
- for_xyz 6y agoLast time I checked (almost 2 years ago) OpenLayers did not support webgl backend for vector graphics. That's why it was slower.
- jokoon 6y agoAren't those vector tiles a little heavy, since they're likely json? Of course I can guess a lot of data can be removed and simplified, but still, PNG seem lighter...
- durkie 6y agoIt depends on the application, but I don't think they're necessarily larger in size. I believe the format is quite compressed (Mapbox Vector Tile/MVT, which I believe is a variant of protocol buffers). Many vector tile encoders have wide flexibility in geometry simplification/removal depending on zoom layer and this helps big time with tile size. I find them to be quite nice in lower bandwidth situations because you can overzoom them and still have them look good: if you zoom in and the tiles for the next zoom level haven't loaded, the vector geometry is still able to look decent, rather than pixellated like a raster tile.
- jokoon 6y agoCompressed? Are you saying decompression is done with JS?
- nbadg 6y agoYou're mixing up the formats slightly: MVT is sqlite with a particular schema; OSM raw data is PBF with a particular schema.
- durkie 6y agoIsn't mbtiles sqlite?
- nbadg 6y agoIt might be that pbfs are stored inside sqlite? The whole thing is really incredibly confusing to be honest. What I can tell you is that my vector slippymap XHR is requesting .pbf files, so that would definitely imply protobuffers as the wire format. Ultimately that's using t-rex and mapbox-gl.js, so... not sure if there's something intermediate. But the mapbox docs say sqlite? I'm just very confused now.
- maxerickson 6y agohttps://docs.mapbox.com/vector-tiles/specification/ https://docs.mapbox.com/vector-tiles/specification/
- kylebarron 6y agoA popular open source server-side rasterization program is tileserver-gl: https://github.com/maptiler/tileserver-gl https://github.com/maptiler/tileserver-gl
- jokoon 6y ago> Yes, I wish this was easier too. I've used spatialite, and even though the doc is poor, I've managed to do things with it, and it works fine. I'm not sure I can generate tiles with QGIS and spatialite. It's true that open source GIS software is not easy to find, since GIS is not easy in the first place.