Skip to content
Permalink
Browse files

Adjusting to WCS 2.0 Core corrigendum 2.0.1 (#4003).

  • Loading branch information...
Schpidi committed Aug 29, 2012
1 parent d36ca21 commit 58490695ad730eb4366b49055b25c9681b7472b7
Showing with 21 additions and 17 deletions.
  1. +6 −4 mapwcs.h
  2. +15 −13 mapwcs20.c
@@ -165,7 +165,7 @@ typedef wcs20AxisObj * wcs20AxisObjPtr;

typedef struct
{
char *version; /* 2.0.0 */
char *version; /* 2.0.0 v 2.0.1 */
char *request; /* GetCapabilities|DescribeCoverage|GetCoverage */
char *service; /* MUST be WCS */
char **accept_versions; /* NULL terminated list of Accepted versions */
@@ -231,10 +231,12 @@ typedef wcs20coverageMetadataObj * wcs20coverageMetadataObjPtr;
#define MS_WCS_20_PROFILE_CORE "http://www.opengis.net/spec/WCS/2.0/conf/core"
#define MS_WCS_20_PROFILE_KVP "http://www.opengis.net/spec/WCS_protocol-binding_get-kvp/1.0/conf/get-kvp"
#define MS_WCS_20_PROFILE_POST "http://www.opengis.net/spec/WCS_protocol-binding_post-xml/1.0/conf/post-xml"
#define MS_WCS_20_PROFILE_GEOTIFF "http://www.opengis.net/spec/WCS_encoding_geotiff/1.0/conf/geotiff"
#define MS_WCS_20_PROFILE_GML_GEOTIFF "http://www.placeholder.com/GML_and_GeoTIFF"
#define MS_WCS_20_PROFILE_GML "http://www.opengis.net/spec/GMLCOV/1.0/conf/gml-coverage"
#define MS_WCS_20_PROFILE_GML_MULTIPART "http://www.opengis.net/spec/GMLCOV/1.0/conf/multipart"
#define MS_WCS_20_PROFILE_GML_SPECIAL "http://www.opengis.net/spec/GMLCOV/1.0/conf/special-format"
#define MS_WCS_20_PROFILE_GML_GEOTIFF "http://www.opengis.net/spec/GMLCOV_geotiff-coverages/1.0/conf/geotiff-coverage"
#define MS_WCS_20_PROFILE_GEOTIFF "http://www.opengis.net/spec/WCS_geotiff-coverages/1.0/conf/geotiff-coverage"
#define MS_WCS_20_PROFILE_CRS "http://www.opengis.net/spec/WCS_service-model_crs-predefined/1.0/conf/crs-predefined"
#define MS_WCS_20_PROFILE_IMAGECRS "http://www.placeholder.com/IMAGECRS"
#define MS_WCS_20_PROFILE_SCALING "http://www.opengis.net/spec/WCS_service-model_scaling+interpolation/1.0/conf/scaling+interpolation"
#define MS_WCS_20_PROFILE_RANGESUBSET "http://www.opengis.net/spec/WCS_service-model_band-subsetting/1.0/conf/band-subsetting"

@@ -2878,10 +2878,12 @@ static int msWCSGetCapabilities20_CreateProfiles(
MS_WCS_20_PROFILE_CORE, NULL,
MS_WCS_20_PROFILE_KVP, NULL,
MS_WCS_20_PROFILE_POST, NULL,
MS_WCS_20_PROFILE_CRS, NULL,
MS_WCS_20_PROFILE_IMAGECRS, NULL,
MS_WCS_20_PROFILE_GEOTIFF, "image/tiff",
MS_WCS_20_PROFILE_GML, NULL,
MS_WCS_20_PROFILE_GML_MULTIPART, NULL,
MS_WCS_20_PROFILE_GML_SPECIAL, NULL,
MS_WCS_20_PROFILE_GML_GEOTIFF, NULL,
MS_WCS_20_PROFILE_GEOTIFF, "image/tiff",
MS_WCS_20_PROFILE_CRS, NULL,
MS_WCS_20_PROFILE_SCALING, NULL,
MS_WCS_20_PROFILE_RANGESUBSET, NULL,
NULL, NULL /* guardian */
@@ -3249,8 +3251,8 @@ static int msWCSDescribeCoverage20_CoverageDescription(mapObj *map,
/* -------------------------------------------------------------------- */
/* SupportedCRS */
/* -------------------------------------------------------------------- */

{
/* for now, WCS 2.0 does not allow per coverage CRS definitions */
/*{
xmlNodePtr psSupportedCrss;
char *owned_value;
@@ -3278,7 +3280,7 @@ static int msWCSDescribeCoverage20_CoverageDescription(mapObj *map,
BAD_CAST "NativeCRS", BAD_CAST cm.srs_uri);
msFree(owned_value);
}
}*/

/* -------------------------------------------------------------------- */
/* SupportedFormats */
@@ -4158,7 +4160,7 @@ int msWCSDispatch20(mapObj *map, cgiRequestObj *request, owsRequestObj *ows_requ
if(status == MS_FAILURE)
{
msDebug("msWCSDispatch20(): Parse error occurred.\n");
msWCSException20(map, "InvalidParameterValue", "request", "2.0.0" );
msWCSException20(map, "InvalidParameterValue", "request", "2.0" );
msWCSFreeParamsObj20(params);
return MS_FAILURE;
}
@@ -4208,7 +4210,7 @@ int msWCSDispatch20(mapObj *map, cgiRequestObj *request, owsRequestObj *ows_requ
if (version == OWS_VERSION_BADFORMAT)
{
msWCSException20(map, "InvalidParameterValue",
"request", "2.0.0" );
"request", "2.0" );
msWCSFreeParamsObj20(params);
return MS_FAILURE;
}
@@ -4223,9 +4225,9 @@ int msWCSDispatch20(mapObj *map, cgiRequestObj *request, owsRequestObj *ows_requ

/* Now the version has to be set */
if(params->version == NULL
|| !EQUAL(params->version, "2.0.0"))
|| (!EQUAL(params->version, "2.0.0") && !EQUAL(params->version, "2.0.1")))
{
msDebug("msWCSDispatch20(): version and service are not compliant with WCS 2.0.0\n");
msDebug("msWCSDispatch20(): version and service are not compliant with WCS 2.0\n");
msWCSFreeParamsObj20(params);
msResetErrorList();
return MS_DONE;
@@ -4254,7 +4256,7 @@ int msWCSDispatch20(mapObj *map, cgiRequestObj *request, owsRequestObj *ows_requ
msSetError(MS_WCSERR, "Layer name '%s' is not a valid NCName.",
"msWCSDescribeCoverage20()", map->layers[i]->name);
msWCSFreeParamsObj20(params);
return msWCSException(map, "mapserv", "Internal", "2.0.0");
return msWCSException(map, "mapserv", "Internal", "2.0");
}
}
}
@@ -4285,9 +4287,9 @@ int msWCSDispatch20(mapObj *map, cgiRequestObj *request, owsRequestObj *ows_requ

#else /* defined(USE_LIBXML2) */
if(params->service && params->version &&
EQUAL(params->service, "WCS") && EQUAL(params->version, "2.0.0"))
EQUAL(params->service, "WCS") && (EQUAL(params->version, "2.0.0") || EQUAL(params->version, "2.0.1")))
{
msSetError(MS_WCSERR, "WCS 2.0.0 needs mapserver to be compiled with libxml2.", "msWCSDispatch20()");
msSetError(MS_WCSERR, "WCS 2.0 needs mapserver to be compiled with libxml2.", "msWCSDispatch20()");
return msWCSException(map, "mapserv", "NoApplicableCode", "1.0.0");
}
else

0 comments on commit 5849069

Please sign in to comment.
You can’t perform that action at this time.