SimpleMapServer 'virtual' layers configuration

<Back home>

Virtual layers are layers which doesn't exists, it's just a list or redirection to various existing layers.
This allow to create layers with a pyramidal structure of LOD, each LOD having a different number of tiles.
It is also possible to create layers which display completly different data depending on the zoom factor.

For exemple let say that we have 3 real layers:
- earth1 at low resolution in one small data file.
- earth2 at medium resolution in 4 files.
- earth3 at high resolution in 200 files.
--> we create a virtual layer 'earth' which point to layer earth1 at low resolution, then earth1, then earth2 at highest resolution.

When the server get a request, it check if the requested layer is virtual, if so, it look at the requested image resolution, and forward the request to the layer matching this resolution. The resolution is defined as a range, in data-unit/pixel. The range property starts with the BIGGEST value, then a space and the SMALLEST value. If the request match no defined range, the default layer is used.

The list of virtual layers is defined in a property file called 'virtualLayers.props' which is in the webapp direcory (folder where there is by default the mapServer.props file).
Here is an exemple of setting:

# this setting file will define 'virtual' layers
# - a virtual layer is an alias to one or several existing layers
# - a virtual layer may have several redirection to various layers, each redirection is defined by a resolution 'range'
# - the range is expressed in data-file-unit/pixel. '+' is for infinity, '-' is for minus infinity
# - a virtual layer can be 'visibl'e or not in the capabilities
# - if no range match the requested resolution, the 'default' existing layer is used
# - the description field will be used in the capabilities (instead of the default layer one)
# - one redirection is defined by 2 consecutive lines: layer= then range=.

description=toto layer, virtual of Visible 3
range=.2 .002
range=.002 -

description=titi layer, virtual of Visible 2
range=.2 -


gilles.lavaux <at> serco <dot> com