Skip to main content

Hi all,

I used FME to transform .tiff format to .mbtiles (Sqlite Mbtiles). But I got an error:

MBTILES writer: Could not find an appropriate zoom level

I don't know how to setting zoom level in this transformation?

Could you please tell me?

Thank you

Hi @hoa_le, the MBTiles writer seems to compute the min and max zoom level for the destination dataset based on the extents and the resolution of the source raster automatically. However, possibly the writer could not determine the zoom level If the resolution of the source raster was too high or too low against the extents.

Could you please show us these properties of the source TIFF raster, which are displayed on the Feature Information window of FME Data Inspector?

  • Coordinate System
  • Min Extents
  • Max Extents
  • Resolution (Columns x Rows)

Hi Takashi,

Last time, I convert for google earth images that the coordinate is not clear (not yet defined).

Now, I tried to Landsat 8 image, the transform is successful. But Level zoom is only 8 to 12. Actually, I want to set level zoom from 13 to 18. But I can't make that. Could you tell me why? How can I do?

Thank you


Hi Takashi,

Last time, I convert for google earth images that the coordinate is not clear (not yet defined).

Now, I tried to Landsat 8 image, the transform is successful. But Level zoom is only 8 to 12. Actually, I want to set level zoom from 13 to 18. But I can't make that. Could you tell me why? How can I do?

Thank you

I think the destination zoom level(s) will be determined by the writer according to the extents and resolution of the source raster. Why not show us the properties (min/max extents and resolution) of the source raster?

 


Hi,

The properties of my landsat image :


The sizes of the source raster extents in the web map tile coordinate system (Spherical Mercator, EPSG:3857) are:

Width = approx 43,740 m
Height = approx 37,014 m

In zoom level 12, the length of a side of each tile is approx 9,784 m, the resolution of each tile is 256 x 256 pixels (it's fixed regardless of zoom levels), therefore the required resolution is:

Number of Columns = 43,740 / 9,784 x 256 = 1,145 pixels
Number of Rows = 37,014 / 9,784 x 256 = 969 pixels

The resolution of the source raster shown in your screenshot (Columns and Rows: 1458,  1166) is greater than the required resolution, so the raster can be saved with zoom level 12.

In zoom level 13, the length of a side of each tile is approx 4,892 m,  the required resolution is:

Number of Columns = 43,740 / 4,892 x 256 = 2,289 pixels
Number of Rows = 37,014 / 4,892 x 256 = 1,937 pixels

The resolution of the source raster was less than the required resolution in zoom level 13. I think it's the reason why the maximum zoom level has been limited to 12 in the resulting MBTiles dataset.

I don't think it's possible to save the raster with 13 or greater zoom levels, unless you get or create a higher resolution raster which satisfies the required resolution for your desired zoom level.


Yes, so FME can't transform MBTILEs in high level zoom (example: 16-19) as TileMill software?

In TileMill software can make that, but it can not create batch processing for multiple images.


Yes, so FME can't transform MBTILEs in high level zoom (example: 16-19) as TileMill software?

In TileMill software can make that, but it can not create batch processing for multiple images.

The conclusion of my previous post is: the MBTiles writer could write the raster with larger zoom level if you sent a raster with higher resolution to the writer.

 

You can increase the resolution of the source raster with a RasterResampler transformer if necessary, but be aware that increasing the resolution by the resampling operation would not improve accuracy of the data at all.

 


Reply