Any way to write to different zoom levels on the same MBTile?
If I change the mbtiles_zoom_level and send 2 rasters to the writer - it still writes 2 different tiles, and not within a single MBTile and different layers/overview. Is this not possible?
Page 1 / 1
Hello @sigher! The zoom level parameters in the writer feature type should allow you to control zoom level. The maximum zoom level should be determined automatically based on the spacing/resolution of the dataset (with the Base Zoom Level Strategy parameter). Then the minimum zoom level is determined by the Minimum Zoom Level parameter. You should only need to send a single raster to the writer. Can you explain a bit more about what you’re trying to do? Happy to help, Kailin.
I tried, but it seems that it adds the data to individual files, one with the filename and one with _1 filename. So two different files instead of a single mbtile
Hello @sigher, hmm thinking more about this, I am unsure it is possible. I think each tile only supports a single zoom level. In the MBTiles dataset, you would have a number of tiles for each zoom level. For example, you would have a set of tiles for zoomlevel 5, twice as many for zoomlevel 6, then twice as many again for zoomlevel 7, and so forth. Each zoomlevel has a fixed pixel size in world coordinates, so it would be impossible to have a tile with more than one zoomlevel, which is why I think FME is writing a seperate MBTile. I hope this makes sense, sorry for the bad news! Happy FMEing, Kailin.
I have figured out that I can read the two separate mbtiles files in FME as a SQLite db and there I can see that they have different zoom levels. I am trying to have high resolution of only a small area and not all tiles at the lower zoom levels.
Hello @sigher, sorry for my late reply! I am still unsure this is possible, FME will write all the features per zoom level with the same extents/resolution. Perhaps someone who is more familiar with MBTiles and zoomLevels can chime in, sorry I don’t have a better solution for you. Happy to help, Kailin!
Hi @sigher,
The transformers WebMapTiler, RasterExtractor and RasterMosaicker can be of help.
The WebMapTiler lets you create the different zoom_levels, using the parameters minimum and maximum zoom level.
When followed immediately by the RasterExtractor, you can save the raster as a blob-attribute.
The RasterMosaicker merges multiple raster features into a single raster feature. You can specify a zoom_level in the Group-by parameter to create a Raster tile for each zoom_level and use this to fanout the results.
When the goal is to obtain one single .mbtiles-file, you need to ensure that you are sending one single feature to the Writer (as @kailinatsafe mentioned). In that case, set the parameter Merge Palettes to No.