|Home | Products | Issue Tracker | FAQ | Download|
|Author:||Alan Boudreault (aboudreault at mapgears.com)|
|Author:||Daniel Morissette (dmorissette at mapgears.com)|
|Author:||Yewondwossen Assefa (yassefa at dmsolutions.ca)|
|Status:||Adopted on 2010-02-25 and implemented in MapServer 6.0|
At the moment, it is not possible to hide/disable a layer in OGC Web Services. Everybody recognizes the need to be able to hide layers from a given mapfile from some or all OGC Web Service (OWS) requests.
This is a proposal to add the ability to enable/disable layers in OGC Web Services in MapServer.
There was also a discussion on this topic in the wiki at http://trac.osgeo.org/mapserver/wiki/HidingLayersInOGCWebServices
Here are some use cases to demonstrate the need of hiding layers:
The main concern was to minimalize user’s changes in their mapfiles. It seems that the easier way to go would be to use metadata, as we already do currently for some ows settings.
All OWS services will be disabled by default unless enabled at map or layer level. The OWS services can be enabled using the following metadata:
The value of the metadata is a list of the requests to enable:
"GetMap GetFeature GetFeatureInfo"
The possible values are the request names for each service type as defined in the corresponding OGC specification.
For convenience, there are also two special characters we can use in the requests list:
Fully enable WMS:
Enable WMS, all requests except GetFeatureInfo:
wms_enable_request "* !GetFeatureInfo"
Enable WMS with only GetMap and GetFeatureInfo:
wms_enable_request "GetMap GetFeatureInfo"
Enable any/all OGC Web Service request types:
Disable any/all OGC Web Service request types, mostly useful at the layer level to hide a specific layer:
A particularity of the proposed solution is the inheritance of settings between the map and the layer level. The settings at the map level apply to all layers unless they are overriden at the layer level. Example:
Fully enable WFS for all layers at the map level:
Disable WFS GetFeature request in a specific layer (All other requests will remain enabled):
The current behavior of the wms_layer_group is to provide hierarchy of layers and expose it through the capabilities document. The parent layers do not conatin a <Name> tag, thus are not accessible through the GetMap and GetFeatureInfo requests. With an upgrade of wms_layer_group functionality to use Group parameter to indicate the level of the XPath expression that can be requested (refer to http://trac.osgeo.org/mapserver/ticket/1632), and the addition of the functionality discussed in this RFC, the user will have flexibility to configure the map file to show/hide low level layers and to allow or not WMS requests at different levels of the tree hierarchy. This is especially important to be able to support the INSPIRE requirements.
This section of the RFC was not implemented and will be done as part of future INSPIRE related enhancements, likely in 6.2.
All OWS services will be disabled by default. This implies that all users will have to modify their mapfiles and add the following line to get their ogc services working as before.
Adopted on 2010-02-25 with +1 from FrankW, PericlesN SteveW, DanielM, AssefaY, JeffM, TamasS