Layer Groups

A layer group is a group of layers that can be referred to by one name. This allows for simpler WMS requests, as the request need only refer to one layer as opposed to multiple inidividual layers. Layer groups act just like standard layers as far as WMS is concerned.

../../_images/data_layergroups.png

Layer Groups page

Edit Layer Group

To bring up the layer group edit page, click on a layer group name. The initial fields allow for the configuration of the name, bounds, and projection of the layer group. To automatically set bounding box, select the Generate Bounds button, other put in your own custom numbers. To select an appropriate projection click the Find button.

Note

A layer group can consist of layers with dissimilar bounds and projections. GeoServer will automatically reproject all layers to the projection of the layer group.

At the bottom of the page is a table listing the layers contained within the current layer group. When a layer group is processed, the layers are rendered in the order provided, so that the layer at the bottom of list will be rendered last, and thus will show on top of the other layers.

../../_images/data_layergroups_edit.png

Layer Groups Edit page

The Style column shows the style associated with each layer. To change the style associated with a layer, click the appropriate style link. A list of enabled styles will be displayed. Clicking on a style name reassigns the layer’s style.

../../_images/data_layergroups_edit_styles.png

Style editing for a layer within a layer group

To remove a layer from the layer group, select the layer’s button in the Remove column. You will not be prompted to confirm or cancel this deletion.

You can view layers group in the Layer Preview section of the web admin.

../../_images/data_layergroups_tasmania.png

Openlayers preview of the layer group “tasmania”

A layer can be positioned higher or lower on this list by clicking the green up or down arrows, respectively.

A layer can be added to the list by pressing the Add Layer... button at the top of the layer table. From the resulting list of layers, select the layer to be added by clicking on the layer name. This latest layer will be appended to the bottom of the layer list.

../../_images/data_layergroups_add_layer.png

Dialog for adding a layer to a layer group

Add a Layer Group

The buttons for adding and removing a layer group can be found at the top of the Layer Groups page.

../../_images/data_layergroups_add.png

Buttons to add or remove a layer group

To add a new layer group, select the “Add a new layer group” button. You will be prompted to name the layer group.

../../_images/data_layergroups_name.png

New layer group dialog

When finished, click Submit. You will be redirected to an empty layer group configuration page. Begin by adding layers by clicking the Add layer... button (described in the previous section). Once the layers are positioned accordingly, press Generate Bounds to automatically generate the bounding box and projection. Press Save to save the new layer group.

../../_images/data_layergroups_add_edit.png

New layer group configuration page

Remove a layer group

In order to remove a layer group, click on the check box next to the layer group. Multiple layer groups can be selected for match removal. Click the remove selected layer group(s) link. You will be asked to confirm or cancel the deletion. Selecting OK successfully removes the layer group.

../../_images/data_layergroups_delete.png

Removing a layer group

Previous: Layers
Next: Styles