Permalink
Browse files

Addressing #5047: the coverages CRS is now the default subsettingCrs …

…rather than imageCRS.
  • Loading branch information...
constantinius committed Jun 2, 2015
1 parent e2d23f5 commit bb63909281ea574d48396dfcece5873e76881c40
Showing with 12 additions and 3 deletions.
  1. +12 −3 mapwcs20.c
View
@@ -3707,8 +3707,11 @@ static int msWCSGetCoverage20_FinalizeParamsObj(wcs20ParamsObjPtr params, wcs20A
params->subsetcrs = msStrdup(crs);
}
} else if (!params->subsetcrs) {
- /* default to imageCRS */
- params->subsetcrs = msStrdup("imageCRS");
+
+
+
+ /* default to CRS of image */
+ /*params->subsetcrs = msStrdup("imageCRS");*/
}
return MS_SUCCESS;
@@ -4126,7 +4129,7 @@ this request. Check wcs/ows_enable_request settings.", "msWCSGetCoverage20()", p
msWCSClearCoverageMetadata20(&cm);
msSetError(MS_WCSERR,
"Error loading CRS %s.",
- "msWCSGetCoverage20()", params->subsetcrs);
+ "msWCSGetCoverage20()", cm.srs);
return msWCSException(map, "InvalidParameterValue",
"projection", params->version);
}
@@ -4165,6 +4168,12 @@ this request. Check wcs/ows_enable_request settings.", "msWCSGetCoverage20()", p
subsets = params->bbox;
+ /* if no subsetCRS was specified use the coverages CRS
+ (Requirement 27 of the WCS 2.0 specification) */
+ if (!params->subsetcrs) {
+ params->subsetcrs = msStrdup(cm.srs);
+ }
+
if(EQUAL(params->subsetcrs, "imageCRS")) {
/* subsets are in imageCRS; reproject them to real coordinates */
rectObj orig_bbox = subsets;

0 comments on commit bb63909

Please sign in to comment.