Hi, all,
I created a large number of layers using the gsconfig module for
Python.I noticed all layers I created had a projection policy of
"Reproject native to declared". I would like to change their
projection policy to "Force Declared", so I wrote this bit of Python
code:
# Open connection to Geoserver catalog
cat = Catalog(serverAddress, username='user', password='password')
wspace = cat.get_workspace('mywkspace')
allGeotiffs = [...]
# Code to load the Geotiff names is cut out...
# Find the timings for each simulation code for the given city
for f in allGeotiffs:
print '** Now processing file: ' + f
r = cat.get_resources(store=f, workspace=wspace)
c = r[0]
print '* Now processing coverage: ' + c.title
c.projection_policy = geoserver.support.FORCE_DECLARED
cat.save(c)
It appears to run with no errors, goes through the list of all files,
and completes. Then I restart Geoserver, but the layers still have
"Reproject native to declared" as projection policy. Am I missing
something?
Thanks in advance!
Max