Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#776 closed enhancement (fixed)

deeper nesting of WMS layers

Reported by: bartvde@… Owned by: mapserverbugs
Priority: high Milestone: 4.4 release
Component: WMS Server Version: 4.3
Severity: minor Keywords:
Cc: valik.solorzano.barboza@…, paul.den.dulk@…

Description

Through this bug report I want to discuss the options for implementing a deeper
WMS layer nesting in Mapserver.

The current situation is a 1 level deep level of nesting through the GROUP keyword.

Seeing the difficulty of implementing all WMS interfaces for GROUP layers in the
past, I would suggest to have the "dummy" layers not to implement a <Name> tag
so that they cannot be requested, they merely serve for categorizing data on a
WMS. E.g.

 ..
 <Layer>
    <Title>Hydrography of the Netherlands</Title>
    <Layer>
      <Title>Rivers</Title>
        <Layer queryable="1">
          <Name>Braided_streams</Name>
          <Title>Braided streams</Title>
          <SRS>EPSG:28992</SRS>
          <LatLonBoundingBox minx="3.2" miny="50.7" maxx="7.2" maxy="53.5" />
        </Layer>
    </Layer>
 </Layer>
 ..

Any thoughts?

Change History (5)

comment:1 by bartvde@…, 20 years ago

Cc: valik.solorzano.barboza@… added

comment:2 by dmorissette, 20 years ago

I think limiting this to non-selectable layers (i.e. layers with no name) would
simplify things a lot since that wouldaffect only the capabilities.

In previous discussions you said that you'd want up to 5 or 6 levels, is this
still the case?  The simplest way I can think of right now to handle this would
be using a "wms_layer_group" (or "wms_group"?) with an XPath-like value.

e.g.
 For the "Braided_streams" layer of your example, the "wms_layer_group" metadata
would be:
   "wms_layer_group"  "/Hydrography of the Netherlands/Rivers"

Then MapServer would have to parse those values for all layers, group the layers
and that to build the capabilities. Implementation would need at least 2 minutes
of thinking, but that would be simple enough for users and very flexible.

comment:3 by valik.solorzano.barboza@…, 20 years ago

Cc: paul.den.dulk@… added
Milestone: 4.4 release

comment:4 by valik.solorzano.barboza@…, 20 years ago

Resolution: fixed
Status: newclosed
This feature has been added to version 4.3. It has been implemented as proposed
by Daniel. We added in mapwms.c 3 functions:

- msWMSPrepareNestedGroups: reads the metadata from WMS_LAYER_GROUP for each
layer and allocates memory for later usage
- msWMSIsSubGroup: determines whether a specified groupname is a subgroup
- msWMSPrintNestedGroups: writes the layers to the capabilities that have the  
                 "WMS_LAYER_GROUP" metadata set. This is a recursive function

In msWMSGetCapabilities the following changes have been made:
- A check is done whether GROUP and WMS_LAYER_GROUP are used at the same time.
If the user tries to use both functionalities at the same time an exception is
returned
- if any WMS_LAYER_GROUP were found then call msWMSPrintNestedGroups
- otherwise the previous functionality will be called

Documentation will follow shortly

comment:5 by dmorissette, 20 years ago

I have created bug 971 about the docs to make sure we don't forget.
Note: See TracTickets for help on using tickets.