[Geoserver-users] How to get layer list of layers that are published?

Hi

I’m stuck.

I’ve been using geoserver with python extension gsconfig library for a while now. Almost everything works as it should be. While there are little things like publish raster images are problematic, there is still workaround that isn’t written into the catalog.py class.

But there is this with I have no idea how to get around.
How do you get a list of layer resource objects that published? catalog.py provides get_layers and get_resources that return layers that are published but not the unpublished layers in a datastore.

I could list all the layers (publish and unpublished) in a datastore through geoserver interface but wms/wfs/wcs and even rest does not

The wms/wfs/wcs services can return layer information in xml but still no layers that are unpublished. I could understand why that is in this case since it is publish facing but I don’t know why REST services have this problem as well.

I have searched a lot of forum with no luck.

Did anyone manage to find a solution for this?

On Tue, Aug 12, 2014 at 4:38 PM, Allen Huang <swapp0@anonymised.com> wrote:

Hi

I'm stuck.

I've been using geoserver with python extension gsconfig library for a
while now. Almost everything works as it should be. While there are little
things like publish raster images are problematic, there is still
workaround that isn't written into the catalog.py class.

But there is this with I have no idea how to get around.
How do you get a list of layer resource objects that published? catalog.py
provides get_layers and get_resources that return layers that are published
but not the unpublished layers in a datastore.

I could list all the layers (publish and unpublished) in a datastore
through geoserver interface but wms/wfs/wcs and even rest does not

The list of featuretype and coverages below a store represent the full list
of available
resources, you just have to add ...?list=available to your url, as
documented here:

http://docs.geoserver.org/stable/en/user/rest/api/featuretypes.html

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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