I want to convert large map file to tms format. how directory structure, zoom levels , tile size, xml file creation have to be dealt with. Please point to the relevant docs.

And is there any gdal c++ api to create tiles(not gdal2tiles.py). Thanks


TMS was an unofficial, interim standard created by OSGeo:


A counterpart was accepted by the OGC standards-creating body as 'Web Map Tile Service'. The WMTS standard is available here:


GDAL distributes GDAL2Tiles bundled in with the library as an official utility, and a GUI tool was put out by the creators, MapTiler, to use it. Maptiler comes in a free basic open-source version. Later the developer created a paid 'cluster' version, presumably on a different codebase: http://www.maptiler.org/

Aside from that, all these can be work with TMS/WMTS if you're willing to do some legwork (like setting up a WMS tileservice first):




  • hey can you point to the exact library function for tile creation (or for creating tms repository). Like we can create tms structure by resampling and saving different size tiles but is there any specific c++ gdal lib which can do this in optimize manner. (or if not in gdal then in osgearth). – user8119 Jun 11 '12 at 18:08
  • 1
    I think it may be productive to just examine gdal2tiles.py The developers weren't re-inventing the wheel when they wrote it; GDAL doesn't have the precise functionality available at a simple CLI command without the stuff in that script. Perhaps you can just re-code it, line by line, in C++ and work on 'optimization' from there? – MappingTomorrow Jun 12 '12 at 11:04
  • hey Thanks Leeney for clarification. Now i can start re-coding it in cpp but before i start can u also clarify that we can't do that using osgearth also. Thanks – user8119 Jun 12 '12 at 21:05
  • Hey guys tms generation can be done using osgearth::util::TMSPackage and there a binary app also osgearth_package that comes with osgearth which automate this work. – user8119 Jun 14 '12 at 19:47

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.