0

I need to use GDAL tools to either create a tile index or create a VRT from a folder full of map tiles. The folder is in the format:

<zoom_level>
     |
     |-- <row_number>
     |       |
     |       |-- <column_number>.png
     |       |-- <column_number>.png
     |-- <row_number>
     |       |
     .       |-- <column_number>.png
     .       |-- <column_number>.png

They're standard slippy-grid / MTS / WMS tiles, all png files.

I can't seem to figure out the right command to do this... does anyone know what I should do here?

  • Those tools can't be used that way because the image files themselves are not georeferenced. – user30184 Aug 8 '18 at 19:11
  • What tools would I need to use, in that case? I could pretty trivially, say, spit out a JSON or XML file containing the corner coordinates for each tile... is there a format in which I could do that, and then be able to pull the files in as a VRT? – DanM Aug 8 '18 at 19:12
  • @user30184 gdal.org/frmt_wms.html This seems to imply that you can use WMS tiles as a data source, and it looks like the <cache> element would allow me to read in local files... that said, there's a lot in here that's a bit over my head. – DanM Aug 9 '18 at 18:29
  • By enabling <cache> gdal creates its cache on disk. I do not know if GDAL is using exactly similar directory structure than you have. If it does it should indeed be possible to point GDAL to use your ready made cache. Another option could be to use the TMS minidriver that is documented on the same page but by default it wants to reach the tiles through http, not directly from disk. – user30184 Aug 13 '18 at 9:48

Your Answer

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

Browse other questions tagged or ask your own question.