[Geoserver-users] layer group option

manunixx@anonymised.com wrote:

Hi!
I read a reply message that you sent to this forum few time ago.. it's about grouping layer in geoserver.
I'm quite confused about this feature, maybe you may halp me ..

Is geoserver able to take differents shape files and merge them for delivering a unique resulting layer to release as a single WMS?

if not, what does the group layer functionality? the documentation about that is very poor, and i didn't understand how proper use this feature. in particular, whom do the Base Map Layers refers to?

Apologies, we should document this a bit better. Brent, could you add this to the FAQ? And clean up the two entries a bit?

There are two things going on

1) WMS capabilities layer grouping

2) Base Map Layer return of features.

The first is purely for the capabilities document - the nesting of layers is a feature of WMS, and it returns embedded layers based on the structure you return.

The second is used in the response, so if I set a base map layer for 'roads,parks,water', then it will return all three in one request.

These two implementations arose separately, and probably should be combined. I'm not sure that it's in the spec, but it seems at least a pseudo-standards to have the name of a group return all sub-layers in the group.

So it sounds like you want the base map layer - to allow one wms request - 'basemap', return more than one configured shapefile layer.

We should probably open a feature request for this, schedule for 1.4.1 or something.

best regards,

Chris

I 'll really do appreciate a little help, thanks!
Emanuele.

!DSPAM:1003,4554552b191341804284693!

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Chris Holmes ha scritto:

The second is used in the response, so if I set a base map layer for 'roads,parks,water', then it will return all three in one request.

These two implementations arose separately, and probably should be combined. I'm not sure that it's in the spec, but it seems at least a pseudo-standards to have the name of a group return all sub-layers in the group.

So it sounds like you want the base map layer - to allow one wms request - 'basemap', return more than one configured shapefile layer.

Wondering, with specific styles or allowing configuration?
When you say layers=basemap what's the equivalent styles=... section of it? I guess, the style setting for basemap should be empty, or ignored?
Also, I guess one may want to configure more than one basemap per geoserver install?

We should probably open a feature request for this, schedule for 1.4.1 or something.

Indeed... this should be beneficial for tile serving as well, since
it allows to get with one request a set of various layers (should be faster on the client side).

Cheers
Andrea

Good catch Andrea. We will need to specify the styles, unless we want to just use the default ones. Also, users might want to reuse the same layers for several groups.

For tiling you can get several layers in one request, you just separate the layer names with commas. So I don't think there will be much of a performance gain because there is just the one request, just a shorter URL.

Brent Owens
(The Open Planning Project)

Andrea Aime wrote:

Chris Holmes ha scritto:

The second is used in the response, so if I set a base map layer for 'roads,parks,water', then it will return all three in one request.

These two implementations arose separately, and probably should be combined. I'm not sure that it's in the spec, but it seems at least a pseudo-standards to have the name of a group return all sub-layers in the group.

So it sounds like you want the base map layer - to allow one wms request - 'basemap', return more than one configured shapefile layer.

Wondering, with specific styles or allowing configuration?
When you say layers=basemap what's the equivalent styles=... section of it? I guess, the style setting for basemap should be empty, or ignored?
Also, I guess one may want to configure more than one basemap per geoserver install?

We should probably open a feature request for this, schedule for 1.4.1 or something.

Indeed... this should be beneficial for tile serving as well, since
it allows to get with one request a set of various layers (should be faster on the client side).

Cheers
Andrea

!DSPAM:1005,4558be9b241321425493344!

Yeah, I think that we should have both options, the baselayer thing, with styles able to be configured as well, as one. And then the nesting would be the other option, with the same backend. Basically we would read the option that they used to order their WMS capabilities, and return all sublayers of a group when you request by a group name. So basically register those with the same mechanism we do the baselayer with.

Chris

Brent Owens wrote:

Good catch Andrea. We will need to specify the styles, unless we want to just use the default ones. Also, users might want to reuse the same layers for several groups.

For tiling you can get several layers in one request, you just separate the layer names with commas. So I don't think there will be much of a performance gain because there is just the one request, just a shorter URL.

Brent Owens
(The Open Planning Project)

Andrea Aime wrote:

Chris Holmes ha scritto:

The second is used in the response, so if I set a base map layer for 'roads,parks,water', then it will return all three in one request.

These two implementations arose separately, and probably should be combined. I'm not sure that it's in the spec, but it seems at least a pseudo-standards to have the name of a group return all sub-layers in the group.

So it sounds like you want the base map layer - to allow one wms request - 'basemap', return more than one configured shapefile layer.

Wondering, with specific styles or allowing configuration?
When you say layers=basemap what's the equivalent styles=... section of it? I guess, the style setting for basemap should be empty, or ignored?
Also, I guess one may want to configure more than one basemap per geoserver install?

We should probably open a feature request for this, schedule for 1.4.1 or something.

Indeed... this should be beneficial for tile serving as well, since
it allows to get with one request a set of various layers (should be faster on the client side).

Cheers
Andrea

!DSPAM:1003,4558bfb9242531804284693!

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Brent Owens ha scritto:

Good catch Andrea. We will need to specify the styles, unless we want to just use the default ones. Also, users might want to reuse the same layers for several groups.

For tiling you can get several layers in one request, you just separate the layer names with commas. So I don't think there will be much of a performance gain because there is just the one request, just a shorter URL.

Well, I don't know OpenLayers or MpaBuilder much but I have the impression they do perform a separate request for each layer in the map. Maybe there's a way to group them client side so that they do a single request instead?

Cheers
Andrea

You can specify each layer to be separate, or you can group them as one layer. They essentially just build up a WMS getMap request with the provided layer name. So if the layer name is "roads,parks,rivers" then you will get 3 layers for the price of one (so to speak).
I know mapbuilder works this way, and I am pretty certain open layers does as well.

Brent Owens
(The Open Planning Project)

Andrea Aime wrote:

Brent Owens ha scritto:

Good catch Andrea. We will need to specify the styles, unless we want to just use the default ones. Also, users might want to reuse the same layers for several groups.

For tiling you can get several layers in one request, you just separate the layer names with commas. So I don't think there will be much of a performance gain because there is just the one request, just a shorter URL.

Well, I don't know OpenLayers or MpaBuilder much but I have the impression they do perform a separate request for each layer in the map. Maybe there's a way to group them client side so that they do a single request instead?

Cheers
Andrea

!DSPAM:1005,4558c1e1245031665516417!

Chris Holmes wrote:

manunixx@anonymised.com wrote:
whom do the Base Map Layers refers to?

There are two things going on

1) WMS capabilities layer grouping

2) Base Map Layer return of features.

The first is purely for the capabilities document - the nesting of
layers is a feature of WMS, and it returns embedded layers based on the
structure you return.

The second is used in the response, so if I set a base map layer for
'roads,parks,water', then it will return all three in one request.

So it sounds like you want the base map layer - to allow one wms request
- 'basemap', return more than one configured shapefile layer.

exactly! I want to set up my geoserver so that it will provide more layers
in just one request.

to get this right, I understood I have to do two things:

1) inform a client that I provide a map composed by multiple layers.

The client is able to know that, doing a getCapabilities() request.

The spec WMS 1.3.0. at paragraph 7.2.4.6.2 define that a layer has a
mandatory attribute "title" that specify a single layer feature
or a grouped layer feature.

In case of gruuped layer feature, we just need to indicate the title of
the group in the most external layer, and a title plus name on the other
layer nested. so that a client getMap() request with parameter
"LAYERS=title of the most external" will return all the layers underlying.

am I correct?

If I am, how can i set up a new <base map layer> element in the file
conf/services.xml so that everything works fine?!
may anyone post an exemple or to explain that?

thanks Chris and everybody!

Emanuele

--
View this message in context: http://www.nabble.com/Re%3A-layer-group-option-tf2623321.html#a7334647
Sent from the GeoServer - User mailing list archive at Nabble.com.

Right now the base-map (layer grouping) option does not show up in the capabilities document. It is essentially just a server-side filter, replacing the single layer name with several layer names. The WMS path option in the feature type configuration will group your feature types in the capabilities document, but not when you request the layers with a GetMap request. So with it you cannot use the parent name of the layer to request all child layers.

The best way to make WMS requests with multiple layers is to use either the base-map option or to just list all of the layers in the getMap request: LAYERS=lakes,rivers,roads

You can find the base-map option in config->WMS->Contents
To set the WMS path you need to go to the feature type config menu and edit the text field for each feature type.

Brent Owens
(The Open Planning Project)

manunixx wrote:

Chris Holmes wrote:
  

manunixx@anonymised.com wrote:
whom do the Base Map Layers refers to?
        

There are two things going on

1) WMS capabilities layer grouping

2) Base Map Layer return of features.

The first is purely for the capabilities document - the nesting of layers is a feature of WMS, and it returns embedded layers based on the structure you return.

The second is used in the response, so if I set a base map layer for 'roads,parks,water', then it will return all three in one request.

So it sounds like you want the base map layer - to allow one wms request - 'basemap', return more than one configured shapefile layer.

exactly! I want to set up my geoserver so that it will provide more layers
in just one request.

to get this right, I understood I have to do two things:

1) inform a client that I provide a map composed by multiple layers.

The client is able to know that, doing a getCapabilities() request.

The spec WMS 1.3.0. at paragraph 7.2.4.6.2 define that a layer has a
mandatory attribute "title" that specify a single layer feature
or a grouped layer feature.

In case of gruuped layer feature, we just need to indicate the title of
the group in the most external layer, and a title plus name on the other
layer nested. so that a client getMap() request with parameter
"LAYERS=title of the most external" will return all the layers underlying.
am I correct?

If I am, how can i set up a new <base map layer> element in the file
conf/services.xml so that everything works fine?!
may anyone post an exemple or to explain that?

thanks Chris and everybody!

Emanuele

sorry for catching up so late.
I guess both topics discussed here are specified in the spec.
You can group layers as you want in capabilities.
A grouping layer can be named or "anonymous". In the former case you can
request it and will get an image of all the ones that comprises that group.
In the later case you cannot request it, since its anonymous, but can be used
to let children layers inherit some properties, like crs, sld'ability, etc.
As for the styles, you can have LAYERS=basemap&STYLES=basemapStyle,
then in basemapStyle define a style for each of the children layers (remember
a sld document allows for many featuretype styles).

so you can have the following layer structure and ask for them at the grouping
level you want:

basemap{
  water_bodies{
      rivers
    oceans
  }
  roads{
    highways
    interstate
    local
  }
  {
    buildings
    someotherstuff
  }
}

On Monday 13 November 2006 20:08, Brent Owens wrote:

You can specify each layer to be separate, or you can group them as one
layer. They essentially just build up a WMS getMap request with the
provided layer name. So if the layer name is "roads,parks,rivers" then
you will get 3 layers for the price of one (so to speak).
I know mapbuilder works this way, and I am pretty certain open layers
does as well.

Brent Owens
(The Open Planning Project)

Andrea Aime wrote:
> Brent Owens ha scritto:
>> Good catch Andrea. We will need to specify the styles, unless we want
>> to just use the default ones. Also, users might want to reuse the
>> same layers for several groups.
>>
>> For tiling you can get several layers in one request, you just
>> separate the layer names with commas. So I don't think there will be
>> much of a performance gain because there is just the one request,
>> just a shorter URL.
>
> Well, I don't know OpenLayers or MpaBuilder much but I have the
> impression they do perform a separate request for each layer in the
> map. Maybe there's a way to group them client side so that they do a
> single request instead?
>
> Cheers
> Andrea
>
> !DSPAM:1005,4558c1e1245031665516417!

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Gabriel Roldán (groldan@anonymised.com)
Axios Engineering (http://www.axios.es)
Tel. +34 944 41 63 84
Fax. +34 944 41 64 90

The only restriction to this hierarchy that I see is that a layer cannot be in two or more groups. Say if you wanted your major_roads layer under the 'roads' hierarchy and under the 'evacuation_route' hierarchy. That's why I like our customizable layer groups that we have now (although they just allow for one group at the moment). It really depends on how the person wants to group their layers, and how flexible people want it to determine what is the best route we should go.

Another scary thought is combining several layer's styles into one file. On sigma we have one 2000 line SLD, two 1000 line SLDs, and many 100+ line SLDs, all for individual layers. Ahhh!

Brent Owens
(The Open Planning Project)

Gabriel Roldán wrote:

sorry for catching up so late.
I guess both topics discussed here are specified in the spec.
You can group layers as you want in capabilities.
A grouping layer can be named or "anonymous". In the former case you can request it and will get an image of all the ones that comprises that group. In the later case you cannot request it, since its anonymous, but can be used to let children layers inherit some properties, like crs, sld'ability, etc.
As for the styles, you can have LAYERS=basemap&STYLES=basemapStyle,
then in basemapStyle define a style for each of the children layers (remember a sld document allows for many featuretype styles).

so you can have the following layer structure and ask for them at the grouping level you want:

basemap{
  water_bodies{
      rivers
    oceans
  }
  roads{
    highways
    interstate
    local
  }
  {
    buildings
    someotherstuff
  }
}

On Monday 13 November 2006 20:08, Brent Owens wrote:
  

You can specify each layer to be separate, or you can group them as one
layer. They essentially just build up a WMS getMap request with the
provided layer name. So if the layer name is "roads,parks,rivers" then
you will get 3 layers for the price of one (so to speak).
I know mapbuilder works this way, and I am pretty certain open layers
does as well.

Brent Owens
(The Open Planning Project)

Andrea Aime wrote:
    

Brent Owens ha scritto:
      

Good catch Andrea. We will need to specify the styles, unless we want
to just use the default ones. Also, users might want to reuse the
same layers for several groups.

For tiling you can get several layers in one request, you just
separate the layer names with commas. So I don't think there will be
much of a performance gain because there is just the one request,
just a shorter URL.
        

Well, I don't know OpenLayers or MpaBuilder much but I have the
impression they do perform a separate request for each layer in the
map. Maybe there's a way to group them client side so that they do a
single request instead?

Cheers
Andrea

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
    

Ok, let's put this in a jira issue.

I think we should keep our layer grouping functionality, but by default create a 'layer group' for each thing in the hierarchy created by WMSPath.

So basically defining a hierarchy is just another way to configure things.

Chris

Brent Owens wrote:

The only restriction to this hierarchy that I see is that a layer cannot be in two or more groups. Say if you wanted your major_roads layer under the 'roads' hierarchy and under the 'evacuation_route' hierarchy. That's why I like our customizable layer groups that we have now (although they just allow for one group at the moment). It really depends on how the person wants to group their layers, and how flexible people want it to determine what is the best route we should go.

Another scary thought is combining several layer's styles into one file. On sigma we have one 2000 line SLD, two 1000 line SLDs, and many 100+ line SLDs, all for individual layers. Ahhh!

Brent Owens
(The Open Planning Project)

Gabriel Roldán wrote:

sorry for catching up so late.
I guess both topics discussed here are specified in the spec.
You can group layers as you want in capabilities.
A grouping layer can be named or "anonymous". In the former case you can request it and will get an image of all the ones that comprises that group. In the later case you cannot request it, since its anonymous, but can be used to let children layers inherit some properties, like crs, sld'ability, etc.
As for the styles, you can have LAYERS=basemap&STYLES=basemapStyle,
then in basemapStyle define a style for each of the children layers (remember a sld document allows for many featuretype styles).

so you can have the following layer structure and ask for them at the grouping level you want:

basemap{
    water_bodies{
          rivers
        oceans
    }
    roads{
        highways
        interstate
        local
    }
    {
        buildings
        someotherstuff
    }
}

On Monday 13 November 2006 20:08, Brent Owens wrote:

You can specify each layer to be separate, or you can group them as one
layer. They essentially just build up a WMS getMap request with the
provided layer name. So if the layer name is "roads,parks,rivers" then
you will get 3 layers for the price of one (so to speak).
I know mapbuilder works this way, and I am pretty certain open layers
does as well.

Brent Owens
(The Open Planning Project)

Andrea Aime wrote:
   

Brent Owens ha scritto:
     

Good catch Andrea. We will need to specify the styles, unless we want
to just use the default ones. Also, users might want to reuse the
same layers for several groups.

For tiling you can get several layers in one request, you just
separate the layer names with commas. So I don't think there will be
much of a performance gain because there is just the one request,
just a shorter URL.
        

Well, I don't know OpenLayers or MpaBuilder much but I have the
impression they do perform a separate request for each layer in the
map. Maybe there's a way to group them client side so that they do a
single request instead?

Cheers
Andrea

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

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
    
!DSPAM:1003,45635043151851365099012!

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Hi Brent,

Another scary thought is combining several layer's styles into one file.
On sigma we have one 2000 line SLD, two 1000 line SLDs, and many 100+
line SLDs, all for individual layers. Ahhh!

Well, xml is verbose. Problem is the lack of wysiwyg editor so?
Would it be nicer to xlink to tiny documents from a bigger/grouping one?
BigSld.xml{
  xlink:href=roads.sld
  xlink:href=highways.sld
  xlink:href=soforth
}

sounds nice to me, not sure the spec allows it?

Gabriel

Brent Owens
(The Open Planning Project)

Gabriel Roldán wrote:
> sorry for catching up so late.
> I guess both topics discussed here are specified in the spec.
> You can group layers as you want in capabilities.
> A grouping layer can be named or "anonymous". In the former case you can
> request it and will get an image of all the ones that comprises that
> group. In the later case you cannot request it, since its anonymous, but
> can be used to let children layers inherit some properties, like crs,
> sld'ability, etc. As for the styles, you can have
> LAYERS=basemap&STYLES=basemapStyle, then in basemapStyle define a style
> for each of the children layers (remember a sld document allows for many
> featuretype styles).
>
> so you can have the following layer structure and ask for them at the
> grouping level you want:
>
> basemap{
> water_bodies{
> rivers
> oceans
> }
> roads{
> highways
> interstate
> local
> }
> {
> buildings
> someotherstuff
> }
> }
>
> On Monday 13 November 2006 20:08, Brent Owens wrote:
>> You can specify each layer to be separate, or you can group them as one
>> layer. They essentially just build up a WMS getMap request with the
>> provided layer name. So if the layer name is "roads,parks,rivers" then
>> you will get 3 layers for the price of one (so to speak).
>> I know mapbuilder works this way, and I am pretty certain open layers
>> does as well.
>>
>> Brent Owens
>> (The Open Planning Project)
>>
>> Andrea Aime wrote:
>>> Brent Owens ha scritto:
>>>> Good catch Andrea. We will need to specify the styles, unless we want
>>>> to just use the default ones. Also, users might want to reuse the
>>>> same layers for several groups.
>>>>
>>>> For tiling you can get several layers in one request, you just
>>>> separate the layer names with commas. So I don't think there will be
>>>> much of a performance gain because there is just the one request,
>>>> just a shorter URL.
>>>
>>> Well, I don't know OpenLayers or MpaBuilder much but I have the
>>> impression they do perform a separate request for each layer in the
>>> map. Maybe there's a way to group them client side so that they do a
>>> single request instead?
>>>
>>> Cheers
>>> Andrea
>>
>> ------------------------------------------------------------------------
>>- Using Tomcat but need to do more? Need to support web services,
>> security? Get stuff done quickly with pre-integrated technology to make
>> your job easier Download IBM WebSphere Application Server v.1.0.1 based
>> on Apache Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Gabriel Roldán (groldan@anonymised.com)
Axios Engineering (http://www.axios.es)
Tel. +34 944 41 63 84
Fax. +34 944 41 64 90

Brent Owens wrote:

Right now the base-map (layer grouping) option does not show up in the
capabilities document. It is essentially just a server-side filter,
replacing the single layer name with several layer names. The WMS path
option in the feature type configuration will group your feature types
in the capabilities document, but not when you request the layers with a
GetMap request. So with it you cannot use the parent name of the layer
to request all child layers.

I've tried assigning same WMS path option on the feature type
configuration to differents Featuretype. while doing a getCapabilities
request via Udig no grouped-layers are shown. Just stand-alone
featuretype, as decleared on creation.
May anybody say why?

The best way to make WMS requests with multiple layers is to use either
the base-map option or to just list all of the layers in the getMap
request: LAYERS=lakes,rivers,roads

You can find the base-map option in config->WMS->Contents
To set the WMS path you need to go to the feature type config menu and
edit the text field for each feature type.

Brent Owens
(The Open Planning Project)

manunixx wrote:

Chris Holmes wrote:
  

manunixx@anonymised.com wrote:
whom do the Base Map Layers refers to?
        

There are two things going on

1) WMS capabilities layer grouping

2) Base Map Layer return of features.

The first is purely for the capabilities document - the nesting of
layers is a feature of WMS, and it returns embedded layers based on the
structure you return.

The second is used in the response, so if I set a base map layer for

'roads,parks,water', then it will return all three in one request.

So it sounds like you want the base map layer - to allow one wms request
- 'basemap', return more than one configured shapefile layer.

exactly! I want to set up my geoserver so that it will provide more
layers
in just one request.

to get this right, I understood I have to do two things:

1) inform a client that I provide a map composed by multiple layers.

The client is able to know that, doing a getCapabilities() request.

The spec WMS 1.3.0. at paragraph 7.2.4.6.2 define that a layer has a
mandatory attribute "title" that specify a single layer feature
or a grouped layer feature.

In case of gruuped layer feature, we just need to indicate the title of
the group in the most external layer, and a title plus name on the other
layer nested. so that a client getMap() request with parameter
"LAYERS=title of the most external" will return all the layers
underlying.

am I correct?

If I am, how can i set up a new <base map layer> element in the file
conf/services.xml so that everything works fine?!
may anyone post an exemple or to explain that?

thanks Chris and everybody!

Emanuele

-------------------------------------------------------------------------
SF.net email is sponsored by: A Better Job is Waiting for You - Find it
Now.
Check out Slashdot's new job board. Browse through tons of technical jobs
posted by companies looking to hire people just like you.
http://jobs.slashdot.org/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/Re%3A-layer-group-option-tf2623321.html#a7500834
Sent from the GeoServer - User mailing list archive at Nabble.com.