[Geoserver-users] Geoserver: Layer group: "single" in "named tree"

Hello everyone,

we are using Geoserver 2.4.0 with layer groups. There are some single layer groups (to combine layers which sould not be requested seperately) which are included into named tree layer groups.

The layers are displayed via geoext in a GeoExt.tree.LayerContainer via WMSCapabilitiesLoader.

Sadly the single layers are displayed twice: one time as itself and one time as part of the named tree layer group.

Regarding the user manual this should not happen:
In case a layer is included in a any non single group it won’t be listed anymore in the flat layer list, [...]
http://docs.geoserver.org/latest/en/user/webadmin/data/layergroups.html

Any ideas?

Best Regards
Frederik

Hi Frederik,
I can’t say as to whether a layer should be listed when a member of a layer group (Andrea?), but the simple solution is to turn off the “Advertised” checkbox (Publishing tab for a layer). That way the layer is still enabled but never listed in response to a GetCapabilities request.
Regards,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

···

Jonathan Moules

GIS Analyst Programmer,
Corporate GIS,
Warwickshire County Council
Tel: +44 (0)1926 412588, (Internal: 2588)

On 9 October 2013 13:05, Frederik Haefker <fhaefker@anonymised.com> wrote:

Hello everyone,

we are using Geoserver 2.4.0 with layer groups. There are some single
layer groups (to combine layers which sould not be requested seperately)
which are included into named tree layer groups.

The layers are displayed via geoext in a GeoExt.tree.LayerContainer via
WMSCapabilitiesLoader.

Sadly the single layers are displayed twice: one time as itself and one
time as part of the named tree layer group.

Regarding the user manual this should not happen:
In case a layer is included in a any non single group it won’t be listed
anymore in the flat layer list, […]
http://docs.geoserver.org/latest/en/user/webadmin/data/layergroups.html

Any ideas?

Best Regards
Frederik


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Jonathan,

thanks for your reply.

Your solution works for layers. However I am speaking of hiding single layer groups after including it into named tree layer groups. As fare as I know there is no "Advertised" check box in the option menu of single layer groups - or am I missing something?

Any other idea?

Best Regards
Frederik

On 10/09/2013 02:21 PM, Jonathan Moules wrote:

Hi Frederik,
I can't say as to whether a layer should be listed when a member of a layer group (Andrea?), but the simple solution is to turn off the "Advertised" checkbox (Publishing tab for a layer). That way the layer is still enabled but never listed in response to a GetCapabilities request.
Regards,
Jonathan

Jonathan Moules

GIS Analyst Programmer,
Corporate GIS,
Warwickshire County Council
Tel: +44 (0)1926 412588 <tel:%2B44%20%280%291926%20412588>, (Internal: 2588)

On 9 October 2013 13:05, Frederik Haefker <fhaefker@anonymised.com <mailto:fhaefker@anonymised.com>> wrote:

    Hello everyone,

    we are using Geoserver 2.4.0 with layer groups. There are some single
    layer groups (to combine layers which sould not be requested
    seperately)
    which are included into named tree layer groups.

    The layers are displayed via geoext in a
    GeoExt.tree.LayerContainer via
    WMSCapabilitiesLoader.

    Sadly the single layers are displayed twice: one time as itself
    and one
    time as part of the named tree layer group.

    Regarding the user manual this should not happen:
    In case a layer is included in a any non single group it won’t be
    listed
    anymore in the flat layer list, [...]
    http://docs.geoserver.org/latest/en/user/webadmin/data/layergroups.html

    Any ideas?

    Best Regards
    Frederik

    ------------------------------------------------------------------------------
    October Webinars: Code for Performance
    Free Intel webinars can help you accelerate application performance.
    Explore tips for MPI, OpenMP, advanced profiling, and more. Get
    the most from
    the latest Intel processors and coprocessors. See abstracts and
    register >
    http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
    _______________________________________________
    Geoserver-users mailing list
    Geoserver-users@lists.sourceforge.net
    <mailto:Geoserver-users@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/geoserver-users

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

Hi Frederik,
Ah ok, sorry I missed that. I have nested layer groups but haven’t needed to do that, but now that I think about it I’ve not seen such either. Thus I’m not sure if it is possible. Probably a fairly simple feature request if you have some funds to put towards it.

Alternately, what about using workspaces to create a virtual service? Put all your final stuff into a “final” workspace and only share that.
http://docs.geoserver.org/stable/en/user/services/virtual-services.html?highlight=virtual
Regards,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

···

On 9 October 2013 13:24, Frederik Haefker <fhaefker@anonymised.com> wrote:

Hi Jonathan,

thanks for your reply.

Your solution works for layers. However I am speaking of hiding single layer groups after including it into named tree layer groups. As fare as I know there is no “Advertised” check box in the option menu of single layer groups - or am I missing something?

Any other idea?

Best Regards
Frederik

On 10/09/2013 02:21 PM, Jonathan Moules wrote:

Hi Frederik,
I can’t say as to whether a layer should be listed when a member of a layer group (Andrea?), but the simple solution is to turn off the “Advertised” checkbox (Publishing tab for a layer). That way the layer is still enabled but never listed in response to a GetCapabilities request.
Regards,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

Jonathan Moules

GIS Analyst Programmer,
Corporate GIS,
Warwickshire County Council
Tel: +44 (0)1926 412588, (Internal: 2588)

On 9 October 2013 13:05, Frederik Haefker <fhaefker@anonymised.com> wrote:

Hello everyone,

we are using Geoserver 2.4.0 with layer groups. There are some single
layer groups (to combine layers which sould not be requested seperately)
which are included into named tree layer groups.

The layers are displayed via geoext in a GeoExt.tree.LayerContainer via
WMSCapabilitiesLoader.

Sadly the single layers are displayed twice: one time as itself and one
time as part of the named tree layer group.

Regarding the user manual this should not happen:
In case a layer is included in a any non single group it won’t be listed
anymore in the flat layer list, […]
http://docs.geoserver.org/latest/en/user/webadmin/data/layergroups.html

Any ideas?

Best Regards
Frederik


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Jonathan,

thanks again for your help. Sadly I don't understand you suggestion ^^

Maybe it helps if I explain the situation in more detail:
I have a line layer with precipitation contour lines and another point layers for controlling labels. Both should be seen as one layer for the user. So I included them into a single layer group.

Now I have such groups for different years and seasons. I want them displayed in a compact way due to the existence of other layers with total different informations. Therefore I am using a named tree layer group.

I am displaying this layers (and many more) inside a treepanel and a root like this:
var layerList = new GeoExt.tree.LayerContainer
({
text: 'All Layers',
expanded: true,
loader: new GeoExt.tree.WMSCapabilitiesLoader
({
url: "/geoserver/Postgis/wms?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1",
[…]

Best Regards
Frederik

On 10/09/2013 04:22 PM, Jonathan Moules wrote:

Hi Frederik,
  Ah ok, sorry I missed that. I have nested layer groups but haven't needed to do that, but now that I think about it I've not seen such either. Thus I'm not sure if it is possible. Probably a fairly simple feature request if you have some funds to put towards it.

Alternately, what about using workspaces to create a virtual service? Put all your final stuff into a "final" workspace and only share that.
http://docs.geoserver.org/stable/en/user/services/virtual-services.html?highlight=virtual
Regards,
Jonathan

Hi Frederik,
Well, I’m not certain based on your reading, but this could potentially resolve it, or at least allow you to group those things entirely separately.
Basically you create a new Workspace and put the Layer Groups you want to share into them. Then the URL you use to access them changes to this:

/geoserver/MyNewWorkspace/wms?..

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

···

Or something to that effect. The link I provided has more information and actual examples.

On 9 October 2013 15:37, Frederik Haefker <fhaefker@anonymised.com> wrote:

Hi Jonathan,

thanks again for your help. Sadly I don’t understand you suggestion ^^

Maybe it helps if I explain the situation in more detail:
I have a line layer with precipitation contour lines and another point layers for controlling labels. Both should be seen as one layer for the user. So I included them into a single layer group.

Now I have such groups for different years and seasons. I want them displayed in a compact way due to the existence of other layers with total different informations. Therefore I am using a named tree layer group.

I am displaying this layers (and many more) inside a treepanel and a root like this:
var layerList = new GeoExt.tree.LayerContainer
({
text: ‘All Layers’,
expanded: true,
loader: new GeoExt.tree.WMSCapabilitiesLoader
({
url: “/geoserver/Postgis/wms?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1”,
[…]

Best Regards
Frederik

On 10/09/2013 04:22 PM, Jonathan Moules wrote:

Hi Frederik,
Ah ok, sorry I missed that. I have nested layer groups but haven’t needed to do that, but now that I think about it I’ve not seen such either. Thus I’m not sure if it is possible. Probably a fairly simple feature request if you have some funds to put towards it.

Alternately, what about using workspaces to create a virtual service? Put all your final stuff into a “final” workspace and only share that.
http://docs.geoserver.org/stable/en/user/services/virtual-services.html?highlight=virtual
Regards,
Jonathan

I’m not 100% it’ll do exactly what you want, but I think you can use it to get some semblance of what you want.

Note: It’s not really possible to move layers between workspaces, but Layer Groups can be done it seems.

Regards,
Jonathan

Hi everyone,

Hi Jonathan,

Thanks to an idea of Jonathan, I just solved the problem with the double entry of single layer groups by using multiple workspaces and seperate wms-request.

However, now I have a new problem :wink:

For the multiple GeoExt.tree.WMSCapabilitiesLoader the attribute "rootVisible: false," is not working. I have each time a root-node with the String from the attribute "text: something," and another String which is "GeoServer Web Map Service". *

How can I remove the second tree-node "GeoServer Web Map Service"?

Best Regards
Frederik

*It looks like this:
first level: folder-symbol + text
second level: folder-symbol + "GeoServer Web Map Service"
third level: layers
I wish to remove the second level

On 10/09/2013 04:46 PM, Jonathan Moules wrote:

Hi Frederik,
  Well, I'm not certain based on your reading, but this could potentially resolve it, or at least allow you to group those things entirely separately.
Basically you create a new Workspace and put the Layer Groups you want to share into them. Then the URL you use to access them changes to this:

/geoserver/*MyNewWorkspace*/wms?...
Or something to that effect. The link I provided has more information and actual examples.
I'm not 100% it'll do exactly what you want, but I think you can use it to get some semblance of what you want.

Note: It's not really possible to move layers between workspaces, but Layer Groups can be done it seems.

Regards,
Jonathan

On 9 October 2013 15:37, Frederik Haefker <fhaefker@anonymised.com <mailto:fhaefker@anonymised.com>> wrote:

    Hi Jonathan,

    [...]

    I am displaying this layers (and many more) inside a treepanel and
    a root like this:
    var layerList = new GeoExt.tree.LayerContainer
    ({
    text: 'All Layers',
    expanded: true,
    loader: new GeoExt.tree.WMSCapabilitiesLoader
    ({
    url:
    "/geoserver/Postgis/wms?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1",
    […]

    Best Regards
    Frederik