Study alternative for TileServer
TileServer is not very FOSS friendly:
- the free mbtiles files are old (more than 1 year from OSM), paid versions otherwise
- TileServer software itself is not well maintained, as it depends from node 6 (current: version 10) *
#1 Updated by Philippe May almost 4 years ago
Alternative for getting mbtiles: generation from osm data¶
Download from an OSM mirror:
curl -O http://download.openstreetmap.fr/extracts/asia/india/tamil_nadu.osm.pbf curl -O http://download.openstreetmap.fr/extracts/asia/india/puducherry.osm.pbf
Generation of mbtiles:¶
1. Takes a long time/CPU
2. Can process only 1 file (see ogr2ogr for merging files beforehand)
## Need to generate a single .osm.pdf files ogr2ogr -f MBTILES target.mbtiles tamil_nadu.osm.pbf -dsco MAXZOOM=15
Alternative for serving mbtiles¶
Looks easy, there are libraries for mbtiles (TileStache: http://tilestache.org/).
But, not found any quick and easy solution for serving to mapbox-gl.
#2 Updated by Philippe May almost 4 years ago
Another option: generate static .pbf files using gdal's MVT provider:
ogr2ogr -s_srs EPSG:4326 -t_srs EPSG:3857 -a_srs EPSG:3857 -f MVT /usr/local/lib/gisaf_misc/tiles tamil_nadu.osm.pbf -dsco MAXZOOM=14
The tiles are the same than those generated with MBTILES (used by eg. tileserver), in a proper directory structure that can be served by nginx. The metadata.json file is almost same that what tileserver exposes for mapbox-gl, but needs to be cleaned.
#6 Updated by Philippe May over 2 years ago
Comprehensive list of related tools: https://github.com/mapbox/awesome-vector-tiles#cli-utilities
tilemaker (https://github.com/systemed/tilemaker) worth trying (got compilation error related to protobuf in first try)