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
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.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
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?