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
  • Have you found a solution to this? – Leo.1906 Dec 4 '18 at 10:32
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, privacy policy and cookie policy

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