[Geoserver-users] getCapabilities filtered by workspace contains group layers

Hi,

If i have a getCapabilitiesRequest filtered on a namespace:

localhost:8080/geoserver/geoserver/myworkspace/wms?service=wms&version=1.1.1&request=GetCapabilities

Then it retrieves all the layer of the workspace OK
but also return all the group layers of the geoserver (that belong to no workspace).

How could i set my getcapabilities request so that those group layers are not returned ?

Thanks


Florent Gravin
Camptocamp - Chambéry
0479444492

On Wed, Apr 24, 2013 at 1:55 PM, Florent Gravin
<florent.gravin@anonymised.com> wrote:

Hi,

If i have a getCapabilitiesRequest filtered on a namespace:

localhost:8080/geoserver/geoserver/myworkspace/wms?service=wms&version=1.1.1&request=GetCapabilities

Then it retrieves all the layer of the workspace OK
but also return all the group layers of the geoserver (that belong to no
workspace).

How could i set my getcapabilities request so that those group layers are
not returned ?

I don't think you can. That's weird however, are those layer groups
made exclusively
of layers that are contained in myworkspace?
Otherwise they should not be visible...

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Hi,

···

I don’t think you can. That’s weird however, are those layer groups
made exclusively
of layers that are contained in myworkspace?

No,
some layers of the layer group are not contained in the workspace i used to filter my capabilities document.

i found a past issue :
http://jira.codehaus.org/browse/GEOS-4849

Couldn’t there a problem with the used filtering method ?
Maybe the layer group is returned because at least ONE of the layer of the layer group is contained by the workspace ?

Otherwise they should not be visible…

Cheers
Andrea

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it



Florent Gravin
Camptocamp - Chambéry
0479444492

On Tue, May 7, 2013 at 3:26 PM, Florent Gravin <
florent.gravin@anonymised.com> wrote:

Hi,

I don't think you can. That's weird however, are those layer groups

made exclusively
of layers that are contained in myworkspace?

No,
some layers of the layer group are not contained in the workspace i used
to filter my capabilities document.

i found a past issue :
http://jira.codehaus.org/browse/GEOS-4849

Couldn't there a problem with the used filtering method ?
Maybe the layer group is returned because at least ONE of the layer of the
layer group is contained by the workspace ?

Oh, right right, that's how it works now, a layer group is returned if at
least one of the layers is visible in the current
context

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Hi,

Can we change that ?
Actually i think we had a bug there cause ALL layer groups were returned in a filtered capabilities.

To avoid that, we added workspace to layer groups, but we realised we cannot set a workspace to layer groups that contain layers from different workspaces …

So we are stuck with layer groups that contain layers from several workspaces, we can’t set them a workspace, and they appear in all capabilities filtered by workspace.

Any suggestion ?

···

On Tue, May 7, 2013 at 3:37 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Tue, May 7, 2013 at 3:26 PM, Florent Gravin <florent.gravin@anonymised.com> wrote:


Florent Gravin
Camptocamp - Chambéry
0479444492

Hi,

Oh, right right, that’s how it works now, a layer group is returned if at least one of the layers is visible in the current
context

Cheers

Andrea

==
GeoServer training in Milan, 6th & 7th June 2013! Visit http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


I don’t think you can. That’s weird however, are those layer groups
made exclusively
of layers that are contained in myworkspace?

No,
some layers of the layer group are not contained in the workspace i used to filter my capabilities document.

i found a past issue :
http://jira.codehaus.org/browse/GEOS-4849

Couldn’t there a problem with the used filtering method ?
Maybe the layer group is returned because at least ONE of the layer of the layer group is contained by the workspace ?

On Fri, May 17, 2013 at 11:02 AM, Florent Gravin <
florent.gravin@anonymised.com> wrote:

Hi,

Can we change that ?
Actually i think we had a bug there cause ALL layer groups were returned
in a filtered capabilities.

To avoid that, we added workspace to layer groups, but we realised we
cannot set a workspace to layer groups that contain layers from different
workspaces ..

So we are stuck with layer groups that contain layers from several
workspaces, we can't set them a workspace, and they appear in all
capabilities filtered by workspace.

Any suggestion ?

Someone has to go and change the code, and update the tests.
However there is a catch... what if someone else actually wants the
behavior like it is today?
Do we need some flag to reinstate the old WMS 1.1 behavior somewhere (even
if it's just a system variable?)

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Hi,

Ok we will do a PR about that…
Just adding combo params into workspace or global configuration to ask if we want :

  • all layer groups
  • no layer groups
  • layer groups if at least one layer group belong to the workspace
  • layer groups if all layer of the layer group belong to the workspace

on a filtered by workspace getcapabilities request.

cheers

···

On Fri, May 17, 2013 at 11:17 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Fri, May 17, 2013 at 11:02 AM, Florent Gravin <florent.gravin@anonymised.com> wrote:


Florent Gravin
Camptocamp - Chambéry
0479444492

Hi,

Can we change that ?
Actually i think we had a bug there cause ALL layer groups were returned in a filtered capabilities.

To avoid that, we added workspace to layer groups, but we realised we cannot set a workspace to layer groups that contain layers from different workspaces …

So we are stuck with layer groups that contain layers from several workspaces, we can’t set them a workspace, and they appear in all capabilities filtered by workspace.

Any suggestion ?

Someone has to go and change the code, and update the tests.
However there is a catch… what if someone else actually wants the behavior like it is today?
Do we need some flag to reinstate the old WMS 1.1 behavior somewhere (even if it’s just a system variable?)

Cheers

Andrea

==
GeoServer training in Milan, 6th & 7th June 2013! Visit http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Wed, May 22, 2013 at 2:48 PM, Florent Gravin <
florent.gravin@anonymised.com> wrote:

Hi,

Ok we will do a PR about that..
Just adding combo params into workspace or global configuration to ask if
we want :
- all layer groups
- no layer groups
- layer groups if at least one layer group belong to the workspace
- layer groups if all layer of the layer group belong to the workspace

on a filtered by workspace getcapabilities request.

Florent, I'm afraid that if we discuss it here not all core developers will
read the discussion.
Can you start a thread on geoserver-devel?
Hopefully it will make it easier to gather consensus on how to approach the
issue.

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------