3

I'm using gsconfig python library to acess geoserver rest, my question is how can i get layers from a specific store ?

I'm tried as follow:

from geoserver.catalog import Catalog

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

layers=cat.get_layers('storename')

but it's giving all published layers from geoserver not from that particular store.

Please help me?

1 Answer 1

0

Try defining the resource first and pulling the layers from it:

myResource = cat.get_resources(store='storeName', workspace='workspaceName')
layers = cat.get_layers(myResource)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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