Skip to content

Commit

Permalink
Addressing #5047: the coverages CRS is now the default subsettingCrs …
Browse files Browse the repository at this point in the history
…rather than imageCRS.
  • Loading branch information
constantinius committed Jun 2, 2015
1 parent e2d23f5 commit bb63909
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions mapwcs20.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit bb63909

Please sign in to comment.