[Geoserver-users] Hide WMS layers and make Layer-Groups queryable

Hi to the GeoServer Community,

Maybe this question has been answered a lot of times before, but I am not sure how to do it. In my WMS GeoServer I have some layers and layer-groups based on them, but I only want to show these last ones, I mean, they are like “thematic groups”. I don’t know how to “hide” the layers that compose those groups.

Besides, GeoServer only allows me to do the GetFeatureInfo request to the base layers, but I need to extend this functionality to the group-layers. Is it possible? Should I change the GetCapabilities document to make it possible?

Thank you in advance,

José Miguel Rubio


José Miguel Rubio Iglesias

Subdirección General de Aplicaciones Geográficas

Instituto Geográfico Nacional

C/General Ibáñez de Ibero, 3 28003 MADRID

Despacho: A 0002 Teléfono: 91 597 97 51

E-mail: jmrubio@anonymised.com

www.cartociudad.es

Rubio Iglesias José Miguel ha scritto:

Hi to the GeoServer Community,

Maybe this question has been answered a lot of times before, but I am not sure how to do it. In my WMS GeoServer I have some layers and layer-groups based on them, but I only want to show these last ones, I mean, they are like “thematic groups”. I don’t know how to “hide” the layers that compose those groups.

Besides, GeoServer only allows me to do the GetFeatureInfo request to the base layers, but I need to extend this functionality to the group-layers. Is it possible? Should I change the GetCapabilities document to make it possible?

Layer groups in GeoServer are only syntactic sugar, the requests
parsers take them and expand them into the list of layers that make
them up, the service and security code do not know they exist.
So it's not possible, at the moment, to display the group but not
the layers that do make it up. It's somethign we're planning to
make possible in GeoServer 2.1

You can get the capabilities document, hand change it, and publish
it to your clients as a static file, this way the layers won't show up
in the clients, but it will still be possible to directly issue
requests against them if you know their names.

Also, I've just tried out GetFeatureInfo against a layer group
and it works as expected, even in this case the group is just expanded
and it works for me, I get back multiple results from the various
layers in the group.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Thanks Andrea,

I think this will be enough, I will try to publish the Capabilities Document as a static file, but when some weeks ago I tried to do it I got nothing when I included next lines Mr Arne Kepp told me in httpd.conf file -activating mod_rewrite:

RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*)request=getcapabilities(.*)$ [NC]
RewriteRule ^/yourpath/wms$ modified_document.xml [L]

Are these lines correct? Is there anything more I have to do?

Thanks in advance,

José Miguel

-----Mensaje original-----
De: Andrea Aime [mailto:aaime@anonymised.com]
Enviado el: lunes, 25 de mayo de 2009 12:52
Para: Rubio Iglesias José Miguel
CC: geoserver users
Asunto: Re: [Geoserver-users] Hide WMS layers and make Layer-Groups queryable

Rubio Iglesias José Miguel ha scritto:

Hi to the GeoServer Community,

Maybe this question has been answered a lot of times before, but I am

not sure how to do it. In my WMS GeoServer I have some layers and

layer-groups based on them, but I only want to show these last ones, I

mean, they are like "thematic groups". I don't know how to "hide" the

layers that compose those groups.

Besides, GeoServer only allows me to do the GetFeatureInfo request to

the base layers, but I need to extend this functionality to the

group-layers. Is it possible? Should I change the GetCapabilities

document to make it possible?

Layer groups in GeoServer are only syntactic sugar, the requests

parsers take them and expand them into the list of layers that make

them up, the service and security code do not know they exist.

So it's not possible, at the moment, to display the group but not

the layers that do make it up. It's somethign we're planning to

make possible in GeoServer 2.1

You can get the capabilities document, hand change it, and publish

it to your clients as a static file, this way the layers won't show up

in the clients, but it will still be possible to directly issue

requests against them if you know their names.

Also, I've just tried out GetFeatureInfo against a layer group

and it works as expected, even in this case the group is just expanded

and it works for me, I get back multiple results from the various

layers in the group.

Cheers

Andrea

--

Andrea Aime

OpenGeo - http://opengeo.org

Expert service straight from the developers.