Using the following commands to convert a raster to an mbtiles file using gdal and then creating the ZXY schema. The zoom levels it creates are 2,3,4,5 but I need to be able to specify which zoom levels it creates, specifically zoom levels 9 through 12 for my leaflet map.
gdal_translate -of mbtiles temp.tif temp.mbtiles
gdaladdo -r nearest temp.mbtiles
mb-util --image_format=png temp.mbtiles ./temptiles
I've also tried setting zoom level like this, but then that does not produce any zoom levels, when extracted to the ZXY format via mbutil.
gdaladdo -r bilinear -oo "ZOOM_LEVEL=9" temp.mbtiles
Background info on the temp.tif original file:
Size is 1799, 1059
Origin = (-2699020.142521930392832,1588193.847443336388096)
Pixel Size = (3000.,-3000.)
Corner Coordinates:
Upper Left (-2699020.143, 1588193.847) (134d 7'17.14"W, 47d50'44.64"N)
Lower Left (-2699020.143,-1588806.153) (122d43'44.80"W, 21d 7'19.89"N)
Upper Right ( 2697979.857, 1588193.847) ( 60d53'28.48"W, 47d50'57.51"N)
Lower Right ( 2697979.857,-1588806.153) ( 72d16'48.48"W, 21d 7'28.62"N)
Center ( -520.143, -306.153) ( 97d30'21.52"W, 38d29'50.09"N)
Band 1 Block=1799x1 Type=Float64, ColorInterp=Gray
Description = 2[m] HTGL="Specified height level above ground"
Overviews: 900x530, 450x265, 225x133, 113x67, 57x34