#3083 closed defect (fixed)
When a GetCoverage request is sent to a WCS 1.0.0 server with a bbox that is the same as the defined bbox (describecoverage), the server must NOT return an exception
Reported by: | nsavard | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | 5.4.3 release |
Component: | WCS Server | Version: | 5.4 |
Severity: | normal | Keywords: | ogc, cite, test, wcs, 1.0.0 |
Cc: | tomkralidis, assefa, warmerdam |
Description
A request to a WCS 1.0.0 server with a bbox that is the same as the one returned by a describecoverage operation, must NOT return an exception.
The relevant test is:
wcs1-0-0:getcoverage_operations-getcoverage_request-response_crs-get-kvp-2
The defined bbox is:
<gml:Envelope srsName="EPSG:4326"> <gml:pos>-97.7071758865421 41.0324719184183</gml:pos> <gml:pos>-80.6778361148771 49.6650665681236</gml:pos> </gml:Envelope>
and the GetCoverage? request is:
The response is:
<?xml version='1.0' encoding="ISO-8859-1" ?> <ServiceExceptionReport version="1.2.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net//wcs/1.0.0/OGC-exception.xsd"> <ServiceException code="NoApplicableCode" locator="bbox">msWCSGetCoverage(): WCS server error. Requested BBOX (-97.7071758865421,41.0324719184183,-80.6778361148771,49.6650665681236) is outside requested coverage BBOX (159707,4597895,1400207,5501395) </ServiceException> </ServiceExceptionReport>
Attachments (1)
Change History (13)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Steve: I'm sending you an email with an URL from where to download the map file.
comment:5 by , 15 years ago
Status: | new → assigned |
---|
comment:6 by , 15 years ago
Cc: | added |
---|
Ok, I think I know what's going on, projection problems. This request sets both crs and response_crs and I don't believe the bbox is being projected correctly before being used. That's why you see the EPSG:4326 coordinates in the exception.
In mapwcs.c there's a block of code that starts:
/* handle the response CRS, that is, set the map object projection */ if(params->response_crs || params->crs ) {
That code sets the map->projection based on crs or response_crs. In this case the map->projection becomes EPSG:26915. However, our bbox is still in EPSG:4326 and doesn't get projected to the map->projection anywhere.
So, later in the code there's a comment "if necessary, project the BBOX" comment but no code directly associated with it. Seems like if both crs and response_crs is set we should project the bbox from crs to response_crs (which would be map->projection based on the earlier block). Something like this might work:
if(params->response_crs && params->crs) { projectionObj tmp_proj; msInitProjection(&tmp_proj); if (msLoadProjectionString(&tmp_proj, (char *) params->crs) != 0) return msWCSException( map, NULL, NULL, params->version); msProjectRect(&tmp_proj, &map->projection, &(params->bbox)); msFreeProjection(&tmp_proj); }
At this point the bbox is in the map->projection and we're good to go. I tested with this and it did get past the overlap test where it had been failing. I don't know what down stream effects there might be or if the re-projection is in the right place. I'll attach a patch against the 5.4 branch so you can try it. (the patch is largish because I condensed a bunch of multi-line statements so I could read things easier)
Seems like this would have cropped up before with other CITE tests that set crs and response_crs. Must not be done often.
Steve
comment:8 by , 15 years ago
All the other tests are good then I take it. I'll commit tonite unless there are any comments or objections.
Steve
comment:11 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:12 by , 15 years ago
I ran the msautotest yesterday and I could not see any problem related to this change.
Where can I get relevant mapfiles? Looks like a projection problem. The error message tells me the input bbox isn't being reprojected into the layer extent and the overlap test fails as a result.
Steve