Opened 9 years ago

Closed 5 years ago

#5849 closed enhancement (wontfix)

TMS Minidriver - support TileCache directory structure

Reported by: mko Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc:

Description (last modified by mko)

The TMS Minidriver may by used with local files by pointing the ServerUrl to the local file system in the local service description XML file:

<ServerUrl>file:///data/${z}/${x}/${y}.png</ServerUrl>

Unfortunately, there are other dirctory layouts besides ${z}/${x}/${y}. Please support as replacement variables:

  • for the TileCache directory layout ${x0}, ${x1}, ${x2} and ${y0}, ${y1}, ${y2} in order to generate paths/URLs like zz/xxx/xxx/xxx/yyy/yyy/yyy.format
  • inverted values such as {inv_x} (= maxx-x-1) etc.
  • a {$zz} with leading zero for levels 0-9

Change History (4)

comment:1 by Even Rouault, 9 years ago

Patch appreciated.

Part of it is already implemented by the way :

    /* Hack for some TMS like servers that require tile numbers split into 3 groups of */
    /* 3 digits, like http://tile8.geo.admin.ch/geoadmin/ch.swisstopo.pixelkarte-farbe */
    URLSearchAndReplace(url, "${xxx}", "%03d/%03d/%03d", tiri.m_x / 1000000, (tiri.m_x / 1000) % 1000, tiri.m_x % 1000);
    URLSearchAndReplace(url, "${yyy}", "%03d/%03d/%03d", tms_y / 1000000, (tms_y / 1000) % 1000, tms_y % 1000);

Not sure to understand why you mean by {$z} without leading zero. It should already be the case.

comment:2 by mko, 9 years ago

Description: modified (diff)

Thank you for pointing to ${xxx}. Any chance to get this into the docs?

Ticket description modified regaring ${z}: in order to work with local file system caches, ${zz} (levels 00, 01, .. 24 in stead of 0, 1, .. 24) would be required.

comment:3 by Jukka Rahkonen, 9 years ago

Support for GeoWebCache directory structure would be nice as well but I do not know yet where to find the specification.

comment:4 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.