Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.1.0
-
Component/s: Configuration
-
Labels:None
-
Number of attachments :
Description
If you do a POST to /rest/workspaces/foo/coveragestores.json:
{
"coverageStore": {
"name": "myCoverage",
"workspace": {
"name": "foo"
},
"type": "ImagePyramid",
"enabled": true,
"url": "/path/to/my/pyramid"
}
}
and then a second POST to /rest/workspaces/foo/coveragestores/myCoverage/coverages.json to create the coverage:
{
"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"
}
}
}
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?
Hi Robert,
Yeah, looks like you nailed it, something missing for the coverage case. Any chance you are interested in whipping up a patch?