I have mbtiles data downloaded from internet. I need to publish mbtiles in ArcGIS Server as tiled map service. I find out the layer was not supported on ArcMap during publishing on ArcGIS Server.

Is there a way to publish mbtiles in ArcGIS Server or to convert mbtiles into ArcGIS Tile Package format .tpk?


Esri has a toolbar extension called Data Interoperability which when licensed can be used to convert varying formats of data. Unfortunately, the Data Interoperability does not support* MBTiles. Therefore you would have to utilize FME to read/write the MBTile data. The links below provide some further information into Data Interoperability and FME which you may find helpful.

FME is a software application that is developed by Safe Software which can be purchased and downloaded from their site.

Supported Formats with Data Interoperability http://desktop.arcgis.com/en/arcmap/latest/extensions/data-interoperability/supported-formats-with-the-data-interoperability-extension.htm

FME SQLite MBTiles Reader/Writer https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/mbtiles/mbtiles.htm

*MBTiles in Data Interop are only supported if they are raster only. If there is any vector data contained within the MBTile, then it will not be able to be read by Data Interop. If the data is in pbf format, it will not be able to be read by Data Interop. MBTiles supports PNG, PNG8, and JPEG data stored as binary blobs in the tiles column. MBTile also supports rasters with up to 4 bands.

But, we have an alternative way to create an MBTiles package.


First off stop using TPK - switch to TPKX which uses newer compact cache v2 .bundle format conversion of MBTILES (SQLite database) to TPKX can be done via python. You need to first extract mbtiles tile_data blob's to folder of XYZ/TMS Tiles. This can be done via mbutil python or pbarry python script https://github.com/pbarry/MBTiles-extractor

Once you have folder of PNG/JPG Tiles you may need to reorganize it. Since ESRI uses ROW Y as Folder, the normal folder of tiles is Zoom\Column\row.extension. ESRI uses Zoom\Row\Column.extension because ESRI has placeholders differently (ROW Y is before column). Normal XYZ/TMS Tile server is {z}/{x}/{y}.extension. ESRI Tiles is {z}/{y}/{x}.extension

Once you have "Exploded Cache" ESRI terminology, then you need to build the .bundles. You will need to modify ESRI's Sample code https://github.com/Esri/raster-tiles-compactcache/tree/master/sample_code

We've build dotnet core console app that does this conversion it's for sale for $125 maps@techmaven.net

Alternatively bypass ESRI all together. You can use tile server to deliver WMTS/XYZ to your webmaps and desktop applications. It does not need to be a cached mapserver/mapimage webmap/webappbuilder supports XYZ but ArcMap or ArcGIS Pro requires WMTS. You can use wmts.maptiler.com to generate a getcapabilities XML from your XYZ and use that for your desktop apps to connect to those tiles.

Also take a look at https://desktop.arcgis.com/en/arcmap/latest/tools/server-toolbox/import-map-server-cache.htm



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.