Skip to main content

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)

image.pngimage 

but its file is pbf format

image.pngimage.pngHow 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! ... 🙂

Hi @davidlee​,

Please try using the Mapbox MBTiles writer. This is similar to the Mapbox Vector Tile writers, but writes out raster tiles as PNG.


Hi @davidlee​,

Please try using the Mapbox MBTiles writer. This is similar to the Mapbox Vector Tile writers, but writes out raster tiles as PNG.

Hi @daveatsafe​ I tried it, but output is one .mbtiles format file. :(

image.png


Hi @daveatsafe​ I tried it, but output is one .mbtiles format file. :(

image.png

Hi @davidlee​,

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. :(

image.png

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:

  • Goole folder cache: Zoomlevel -> Tile_row -> Tile_colum
  • Mapbox folder cache: Zoomlevel -> Tile_colum -> Tile_row

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?


Reply