Difference between revisions of "WMS Tile Caching"
Line 64: | Line 64: | ||
* Mikel Maron's description of [http://lists.eogeo.org/pipermail/tiling/2006-March/000017.html OnEarth's LandSat tiling scheme] | * Mikel Maron's description of [http://lists.eogeo.org/pipermail/tiling/2006-March/000017.html OnEarth's LandSat tiling scheme] | ||
− | * World Wind's tiling scheme: [http://www.ceteranet.com/nww-tile-struct.pdf PDF], [http://www.worldwindcentral.com/wiki/Making_Layers wiki] | + | * World Wind's LandSat tiling scheme: [http://www.ceteranet.com/nww-tile-struct.pdf PDF], [http://www.worldwindcentral.com/wiki/Making_Layers wiki] |
(Note: WW and OnEarth schemes are pretty much the same, the WW client just allows you to specify arbitrary tile sizes, coverages and number of levels) | (Note: WW and OnEarth schemes are pretty much the same, the WW client just allows you to specify arbitrary tile sizes, coverages and number of levels) | ||
+ | * World Wind [http://rafb.net/paste/results/S3I8Zr92.html QuadTileSet description] | ||
== Related Projects == | == Related Projects == |
Revision as of 16:04, 29 March 2006
Goal
The goal of a WMS Tile Caching proposal, perhaps WMS-C for short, is to find a way to optimize the delivery of map imagery across the Internet. The proposal needs to offer ideally some means by which map clients can fetch tiles from existing servers, in such a way that the images can be cached on the server, or at an intermediate location, or even be completely pre-generated, if desired. Further, the proposal needs to offer a way of advertising that a cached tile set is available for a given layer from a particular WMS or WMS proxy. The proposal should leverage the existing investment in OGC-compliant WMS servers on the 'Net.
The two main questions to be addressed are:
- How does a server advertise its cacheable image tiles?
- How does a client request possibly cached image tiles?
Proposal
WMS-C as WMS Profile
One approach to take might be to define WMS-C (as in Web Mapping Service - Cached) as a constrained profile of OGC WMS that permits servers to optimize their image generation, and allows tiles to be cached at intermediate points. A WMS-C service would likely only deliver images for bounding boxes aligned to a given rectangular grid, and only at particular scale levels.
The basic idea is that, unlike with WMS, two different requests for a given WMS-C tile should form the exact same HTTP GET request. This invites several constraints on WMS GetMap requests:
- Minimal query string arguments (i.e. no optional arguments permitted, versus §7.2)
- Fixed query string argument ordering and case (versus §6.4.1; q.v. also §7.2.2, Table 8)
- Fixed range of possible bounding boxes, computed from the WMS-C profile parameters
- Fixed precision on bounding box values (clarifying §6.5.6)
- Fixed tile size in pixels
- Fixed layer name and/or layer name ordering
- Fixed styling
- Fixed output format
Some means of identifying these constraints programmatically on a per-server basis, a la GetCapabilities might be desirable. From the table below, it appears that minimum/maximum scale (and scale quantization factor, which should probably never be other than 2) are the only suggested tiling regime parameters that would be difficult to directly express in a WMS GetCapabilities document. Is there some existing way to add custom parameters to a GetCapabilities declaration?
Note that the LAYERS, STYLES, SRS, HEIGHT, WIDTH, and FORMAT arguments to a GetMap request would become fixed for a particular WMS-C tiled layer, but the WMS specification would still require the inclusion of these arguments in every WMS-C request (§ 7.2).
A WMS-C proxy or server should be free to return an exception or a redirect, if it receives a WMS request that is not WMS-C compliant, or involves a bounding box that does not correspond to a single tile in the cache.
Calculating Valid Tile Extents for a Given Request
WMS tile caching implies fixed scale or zoom levels. Typically, each valid scale level would be half that of the next larger scale. It would be worth writing reference code to help developers figure out which tiles they need to load to cover a given bounding box at a given scale.
Possible Tile Scheme Parameters
Parameter | Default value | Specifiable in WMS GetCapabilities? |
"This service suppports tiling." | none | <KeywordList> contains the string 'tiled', perhaps? (§7.1.4.5.3) |
Projection | EPSG:4326 | <SRS> |
Maximal extent | (-180,-90,180,90) | <BoundingBox> (§7.1.4.5.7) |
Number of horizontal and vertical tiles at the maximal extent | none | Could be implied by <ScaleHint> (§7.1.4.5.8, but note that the format is weakly specified)... Alternately, could use <DataURL> (§7.1.4.5.14) |
Tile size in pixels | some power of 2 | <Layer> attribute fixedWidth, fixedHeight (§7.1.4.6) |
Minimum scale | none | <ScaleHint> or <DataURL> (see note, above) |
Scale quantization factor | 2 | <DataURL> |
Other Considerations
- Would non-rectangular tessellations yield more efficient results? If so, which tessellations to consider? Also, are the processing and bandwidth advantages of a non-rectangular tessellation outweighed by the potential implementation complexity?
- Norm Vine rightly points out that a tile request basically boils (or should boil down to) Layer + Zoom Level + Row + Column. Can we define an even simpler method for requesting tiles from servers in the know? How are those capabilities advertised, if not shoehorned into WMS?
Existing Tiling Schemes
- Mikel Maron's description of OnEarth's LandSat tiling scheme
- World Wind's LandSat tiling scheme: PDF, wiki
(Note: WW and OnEarth schemes are pretty much the same, the WW client just allows you to specify arbitrary tile sizes, coverages and number of levels)
- World Wind QuadTileSet description
Related Projects
- osgPlanet
- NASA WorldWind (wiki)
- Community MapBuilder
- other AJAX map clients, presumably
Interested Parties
- Schuyler Erle
- Allan Doyle
- Norman Vine
- Josh Lieberman
- add yourself