I am trying to convert a .las file into mbtiles. Here are the steps I followed:

  1. Convert .las file into .tif in cloud compare.
  2. Reproject the .tif file with gdalwarp.
  3. Creating the tif file into different zoom level with gdaladdo command: gdaladdo -r average cloud.tif 2 4 8 16
  4. Convert the .tif file into mbtiles with gdal_translate: gdal_translate -outsize 512 512 cloud.tif cloud1.mbtiles -co NAME=ortho -co QUALITY=100 -co ZOOM_LEVEL_STRATEGY=AUTO -co TILE_FORMAT=PNG -co WRITE_BOUNDS=YES -of MBTILES
  5. The zoom_level for the resultant .mbtiles is fixed and I got only one zoom_level 23

I want different zoom levels, for example, 12-24 I tried to make different zoom level for the .mbtiles file as well with the command gdaladdo -r average cloud1.mbtiles 2 4 8 16, but getting the error message:

ERROR 6: zoom_level > 22 not supported

What is wrong?

1 Answer 1


There is a hardcoded limit of z22 in the GDAL MBTiles driver that affects some operations. See this bug report https://github.com/OSGeo/gdal/issues/3126

The GeoPackage raster driver supports now zoom levels up to 29 or 30. See commit https://github.com/OSGeo/gdal/commit/d6dd4dc9b147af8871b97c63cc3dcda16a398987. This option is only available in the development version (3.9) at the moment. If you can use GeoPackage instead of MBTiles this could be on option.

  • Thanks. If I want to make the zoom level 22 or lower, can I do it in gdal_translate?
    – Tahmid
    Commented Feb 8 at 22:17
  • At the moment I fear not. The MBTiles driver does have a maxzoom option, but it is only for vector tiles gdal.org/drivers/raster/mbtiles.html. But if you are very lucky then using ZOOM_LEVEL_STRATEGY=LOWER may turn the automatically selected 23 into 22.
    – user30184
    Commented Feb 9 at 7:15

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.