2

Similar to this question: Generating map tiles with QGIS 3.6?, how is it possible to create MBTiles from a raster ? (I operate QGIS 3.4 LRT)

I have tried Save As.... and selecting format: MBTILES, however the resulting file seems very small and generate an error when reimported in QGIS

I also have tried the plugin: Tiles XYZ. However I have always a 32kB result file which is empty when reimported in QGIS and after analysis seems to contain only one tile

  • For reference, here are the parameters passed to plugin Tiles XYZ:*

Démarrage de l'algorithme 'Generate XYZ tiles (MBTiles)'… Param: { 'DPI' : 96, 'EXTENT' : '131000,6000000,6764542,7965990 [EPSG:2154]', 'METATILESIZE' : 4, 'OUTPUT_FILE' : '/tmp/processing_7ayyyy/xxxx/OUTPUT_FILE.mbtiles', 'QUALITY' : 75, 'TILE_FORMAT' : 0, 'TRANSPARENT' : True, 'ZOOM_MAX' : 12, 'ZOOM_MIN' : 6 }

3
  • Have you tried the Generate XYZ tiles (MBTiles) tool from the Processing Toolbox?
    – Joseph
    Commented Aug 14, 2019 at 10:28
  • In QGIS 3.4, Generate XYZ tiles is provided by the plugin Tiles XYZ. One output file is generated (very quickly). When I load it in QGIS, nothing is shown. Analyzing the file, I found out that only the first tile of the set contained a partial image of the map. All other tiles (image), for all zoom levels are white (or transparent in PNG). However in QGIS 3.8, it seems the way to go (cf. gis.stackexchange.com/a/331326/34790)
    – kFly
    Commented Aug 15, 2019 at 21:09
  • This behaviour of the plugin is likely to be related with a bug reported here. That is the reason why I was asking for another process (maybe based on gdal2tiles ou gdal_translate)
    – kFly
    Commented Aug 15, 2019 at 21:26

1 Answer 1

1

Today I had to deal with the same problem. I had the max zoom level too low (same as yours). Changed it from 12 to 21 and it generated a 1.2GB MBtiles file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.