GeoServer News: Hiding layers from the capabilities document

Hi all,
in this blog post we would like to talk about a new functionality that we has just introduced in GeoServer, the layer “advertised” flag.
As you know, ignoring security settings for the moment, all enabled layers configured in GeoServer are made available though all the OGC services for which they make sense: vector layers are published automatically to WMS and WFS, raster layers to WMS and WCS.
This is a fine default behavior, but in some cases one would like that the layer was there, but without making the layer known to the general public. Tipical use cases:
  • you want to expose a set of layers as a layer group, but you don’t want to publish the layers separately
  • some application needs to setup a temporary layer, maybe the result of some computation, without having the whole world know about it
  • the administrator wants a layer to be available for testing, but not have the whole world hit it yet (maybe because the layer configuration/styling is not done)
Up until GeoServer 2.1.1 the above was only partially possible by making the layer available only to certain users via the security setup, but in 2.1.2 it got just a lot easier, there is a new publishing flag, “advertised”, that you can uncheck to hide the layer:
Once un-ckecked the layer won’t appear anymore into the capabilities documents, nor in the layer preview table, but will still be available for all other service requests.
There are other things that could be done to improve layer management, such as attribute renaming, easier association with styles, publishing of a layer only towards certain OGC services and the like. Interested in getting any of that happen today? Let us know!

the GeoSolutions Team.