I need to export tiles from a WMTS server to the MBTiles format. The server is not public, but I have access to it and permission to export a specific portion of the tiles. The problem I have seems to come from the different projections:

  • The WMTS server uses UTM zone 38N (EPSG:23038)
  • The exported MBTiles needs to be in WGS84 spherical mercator (EPSG:3857)

What's the easiest approach to achieve this, and with which tools?

I already tried loading the WMTS source in QGIS and using QTiles. This works, but the resulting tiles are rendered poorly, I guess due to a sub-optimal reprojection algorithm.


I've been able to get this to work using MapProxy. MapProxy is a powerful tool for cases like this, because it allows you to define everything through a configuration file instead of having to click through a UI.

MapProxy supports raster re-projection and various storage formats including mbtiles.

The individual steps to export a certain area are as follows:

  • configure the data source as source and test it through the MaprProxy stand-alone server
  • define a cache in the same projection as the source
  • define a second cache with the target projection, use the first cache as source
  • define the area that should be exported as polygon (e.g. GeoJSON)
  • add the GeoJSON to the seed configuration as coverage
  • define a seed task for the second cache using the specified coverage

Now run the seed task. When it is finished, the exported mbtiles file can be found in the cache_data directory.

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.