How can I create layer groups using python gsconfig ?


1. Connect to Catalog

 cat = Catalog("http://localhost:8080/geoserver/rest","admin", "geoserver")

2. Get some layers and styles

lyrs = [list of layers]

stls = [list of styles]

3. Create the group layer

lg = cat.create_layergroup(groupname)

4. Add the layers and styles to the group layer

lg.layers = lyrs

lg.styles = stls

5. Save the group layer


To specify a workspace I think you need to create a resource and then use that to create the group layer in step 3.

myResource = cat.get_resources(workspace='workspaceName') lg = 

  • 1
    How to create layer group in a particular workspace (choosing a workspace).. – Satya Chandra Nov 26 '14 at 7:01
  • How to edit/modify a already existed layer gruop? – Satya Chandra Feb 2 '15 at 6:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.