Viewing the Example
You can view the example by pointing your WMS viewer to:
http://fmeserver.com/fmeogc/dcampanas/Serve_VE_Tiles.fmw?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1
You can use Google Earth as your WMS viewer, but Google seems to be using the same imagery as our sample in this area, so the WMS overlay pretty much blends right in.
How it Works
Preparing Images
An image cache is prepared for serving using the Create VE Tileworkspace. The image source, in this case a series of MrSID files, is sent through the VirtualEarthTiler transformer to create a large number of smaller images at the base resolution of the original images plus ten layers of overviews.
The transformer uniquely numbers these tiles with both their location and resolution using the naming convention described at Microsoft's
Virtual Earth Tile Systems page. This page also include the table needed to calculate the minimum and maximum zoom levels to be set in the VirtualEarthTiler for your image data.
The image preparation can take a long time (24 hours in the case of this dataset), but only needs to be run once, on FME Server or FME Desktop.
Serving Images
The prepared image data is served through the Serve VE Tilesworkspace. This workspace uses a RangeMapper to find the Virtual Earth tile level that best matches the requested image dimensions, then creates a transparent image based on those dimensions and sends it through the VirtualEarthTiler to create tiles at the calculated level.
These transparent tiles are used as inputs to request the cached image tiles through the RasterReader. Any tiles not found in the cache are replaced by the original transparent tiles to create a complete mosaic. This allows the workspace to serve any image request without failure, even outside the area of the cached imagery.
The mosaic is reprojected into the requested coordinate system, and resampled into the exact output resolution.
Because only a small number of tiles need to be read to supply an image suitable for most WMS overlays, this workspace runs quite quickly. On most systems, a 1024x1024 image can be served in less than 15 seconds.
This workspace must be published to FME Server and registered with the OGC Web Mapping Service.