2

How we can get native SRS and declared SRS of existed layer in GeoServer?

I'm getting up to layer name available in a particular store and work space.

The code as follows

from geoserver.catalog import Catalog  
cat=Catalog("http:// localhost:8080/geoserver/rest")  
myResource = cat.get_resources(store='storeName', workspace='workspaceName')  
layers = cat.get_layers(myResource)
for rss in myResorce:
print rss.name
1
  • Have you found a solution to this?
    – Leo.1906
    Commented Dec 4, 2018 at 10:32

1 Answer 1

1

One further step missed for native box

from geoserver.catalog import Catalog  
cat=Catalog("http:// localhost:8080/geoserver/rest")  
myResource = cat.get_resources(store='storeName', workspace='workspaceName')  
layers = cat.get_layers(myResource)
for rss in myResorce:
print rss.name
print rss.native_bbox ## this is for native bounding box
print rss.projection ## for projection of a layer

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.