I want to build an mbtiles with different map detail at different zoom levels (e.g. contours at 1m at levels >16 and 5m <=16). I've exported raster images at the right resolution using QGIS and now want to combine them with GDAL.
gdal_translate -of mbtiles -co "TILE_FORMAT=PNG8" Level19.png basemap_hires.mbtiles
gdaladdo -r nearest basemap_hires.mbtiles 2 4
gdal_translate -of mbtiles -co "TILE_FORMAT=PNG8" Level16.png basemap_lores.mbtiles
gdaladdo -r nearest basemap_lores.mbtiles 2 4 8 16
generates levels 19->17 from the hi-res map and levels 16->12 from the lo-res map, in separate files. But I'd like to combine them into one file.
Any ideas? Of course, I could use just the Level19.png
file and do 2 4 8 16 32 64
with gdaladdo
, but then the level 16->12 tiles will have too much detail (and puny labels). In a way, this is a replacement for QTiles3 on the cheap, since it would generate the "right" map at all scale levels, but it's not robust for me in QGIS and I really only need 2 levels of detail.