I want to tile cache images and write them to the folder by Mapbox structure with PNG files.
I have tried using WebMapTiler to tile cache images and found it different from Mapbox structure.
I tried also Writer Mapbox Vector Tile (MVT) Tileset to write them and i found that the folder structure was correct (Level-Row-Colum)
but its file is pbf format
How do I create tiling cache images with the same structure above when I use Writer Mapbox Vector Tile (MVT) Tileset in order to write PNG files instead pbf files?
Pls, help me! ... 🙂
Best answer by daveatsafe
davidlee wrote:
Hi @daveatsafe I tried it, but output is one .mbtiles format file. :(
Sorry - missed that. You can extract the images from the mbtiles file using a SQLite reader to read the tiles table. This will have zoom_level, tile_column and tile_row text attributes, along with a tile_data attribute containing the PNG binary as a BLOB. Add a RasterReplacer transformer using the PNG format to convert tile_data to a proper image, then you can output to the same zoomlevel/column/row you would use with the output from the WebMapTiler.
I compared the images in the .mbtiles to the output of the WebMapTiler using the GoogleMapsCompatible scheme, and they seem to have the same image and column numbers, but with an offset in the row numbers. Perhaps Google and Mapbox start the row count at different latitudes.
Sorry - missed that. You can extract the images from the mbtiles file using a SQLite reader to read the tiles table. This will have zoom_level, tile_column and tile_row text attributes, along with a tile_data attribute containing the PNG binary as a BLOB. Add a RasterReplacer transformer using the PNG format to convert tile_data to a proper image, then you can output to the same zoomlevel/column/row you would use with the output from the WebMapTiler.
I compared the images in the .mbtiles to the output of the WebMapTiler using the GoogleMapsCompatible scheme, and they seem to have the same image and column numbers, but with an offset in the row numbers. Perhaps Google and Mapbox start the row count at different latitudes.
Hi @daveatsafe I tried it, but output is one .mbtiles format file. :(
Thank you @debbiatsafe , I got it. I found that it is actually not different, it is just a different way to write out a folder tile cache between Mapbox and Google:
By the way, Do you have any ideas to handle it directly from geotiff to png folder including the option of exporting metadata.json files like Writer Mapbox Vector Tile (MVT) Tileset?
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.