RESTConfig doesn't auto-configure Coverages (SRS/Bounds) like it does with 
FeatureTypes/WMS
-------------------------------------------------------------------------------------------

                 Key: GEOS-4596
                 URL: http://jira.codehaus.org/browse/GEOS-4596
             Project: GeoServer
          Issue Type: Improvement
          Components: Configuration
    Affects Versions: 2.1.0
            Reporter: Robert Coup
            Assignee: Justin Deoliveira


If you do a POST to {{/rest/workspaces/foo/coveragestores.json}}:

{code}
{
  "coverageStore": {
    "name": "myCoverage",
    "workspace": {
      "name": "foo"
    },
    "type": "ImagePyramid",
    "enabled": true,
    "url": "/path/to/my/pyramid"
  }
}
{code}

and then a second POST to 
{{/rest/workspaces/foo/coveragestores/myCoverage/coverages.json}} to create the 
coverage:

{code}
{
  "coverage": {
    "name": "myCoverage",
    "nativeName": "myCoverage",
    "title": "My Coverage",
    "abstract": "Some description",
    "srs": "EPSG:2193",
    "projectionPolicy": "FORCE_DECLARED",
    "enabled": true,
    "nativeFormat": "ImagePyramid",
    "defaultInterpolationMethod": "bilinear",
    "parameters": {
        "entry": [{
            "string": ["AllowMultithreading", True]
        }]
    },
    "requestSRS": {
        "string": "EPSG:2193"
    },
    "responseSRS": {
        "string": "EPSG:2193"
    }
  }
}
{code}

The coverage creates fine, but the Native/LatLon bounds are not set -- which 
then crashes (eg. GetCapabilities) requests and generally does bad things. 
Obviously I can specify them manually, but it'd be miles better if GeoServer 
auto-calculated them like it does in the UI. The same POSTs work fine for 
Feature Types and the bounds are auto-calculated.

Looking at the code, there are {{CatalogBuilder.initFeatureType()}} and 
{{CatalogBuilder.initWMSLayer()}} methods which do this auto-detection, but the 
same thing doesn't occur for coverages. 
{{CatalogBuilder.buildCoverage(AbstractGridCoverage2DReader reader, Map 
customParameters)}} does it, but is only called for PUT requests which include 
an attached file, not for POST requests.

Thoughts?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to