Skip to main content
Question

Can I extract mbtiles to {z}/{x}/{y}.png ?

  • March 22, 2019
  • 3 replies
  • 531 views

If yes how?

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.

3 replies

jakemolnar
Forum|alt.badge.img
  • 98 replies
  • March 22, 2019

Instead of using the MBTiles reader, use the SQLite3 Non-Spatial reader.

You should find a table called "tiles". Read the "tiles" table and use an "AttributeFileWriter" transformer to write the "tile_data" attribute as "$(zoom_level)/$(tile_column)/$(tile_row).png".

With that workflow you should be all set! I've used similar workspaces many times to create GeoPackage tilesets.


  • Author
  • 1 reply
  • March 22, 2019

But when I read the file, I always get error message as below no matter if i use reader with MBtiles or SQLite3.

I downloaded the MBtiles from https://openmaptiles.com/downloads/europe/sweden/stockholm/

/Ramy


jakemolnar
Forum|alt.badge.img
  • 98 replies
  • March 25, 2019

But when I read the file, I always get error message as below no matter if i use reader with MBtiles or SQLite3.

I downloaded the MBtiles from https://openmaptiles.com/downloads/europe/sweden/stockholm/

/Ramy

Ah, maybe you are trying to read *vector* tiles? We have an upcoming MapBox Vector Tiles reader, but unless you're reading the raster dataset you won't find PNGs.

 

Anyway, I tried reading the data with SQLite3 reader and was successful; maybe your download was just corrupted?