From 0a0aacec64d85076558d427d03ded6ae87aca2ca Mon Sep 17 00:00:00 2001 From: Fabian Schindler Date: Wed, 30 May 2012 12:38:01 +0200 Subject: [PATCH 1/3] Parse available formats from map.web.metadata field 'wcs|ows_formats' if given. --- mapwcs20.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mapwcs20.c b/mapwcs20.c index 784a3ab2c9..912c03f9b5 100644 --- a/mapwcs20.c +++ b/mapwcs20.c @@ -1503,6 +1503,17 @@ static char *msWCSGetFormatsList20( mapObj *map, layerObj *layer ) tokens = msStringSplit(value, ' ', &numtokens); } + /* -------------------------------------------------------------------- */ + /* Parse from map.web metadata. */ + /* -------------------------------------------------------------------- */ + + else if(layer == NULL + && (value = msOWSGetEncodeMetadata( &(map->web.metadata), "CO", "formats", + NULL)) != NULL ) + { + tokens = msStringSplit(value, ' ', &numtokens); + } + /* -------------------------------------------------------------------- */ /* Or generate from all configured raster output formats that */ /* look plausible. */ From fb29d28b1b012055a833f3bc02bded5e83955a7f Mon Sep 17 00:00:00 2001 From: Fabian Schindler Date: Wed, 30 May 2012 15:35:34 +0200 Subject: [PATCH 2/3] Parse available formats from map.web.metadata field 'wcs|ows_formats' if given. Now for WCS 1.1. Not possible for WCS 1.0 since this Capabilities does not include a supported formats section. --- mapwcs11.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mapwcs11.c b/mapwcs11.c index d67e081308..56a2164531 100644 --- a/mapwcs11.c +++ b/mapwcs11.c @@ -130,6 +130,17 @@ static char *msWCSGetFormatsList11( mapObj *map, layerObj *layer ) tokens = msStringSplit(value, ' ', &numtokens); } +/* -------------------------------------------------------------------- */ +/* Parse from map.web metadata. */ +/* -------------------------------------------------------------------- */ + + else if(layer == NULL + && (value = msOWSGetEncodeMetadata( &(map->web.metadata), "CO", "formats", + NULL)) != NULL ) + { + tokens = msStringSplit(value, ' ', &numtokens); + } + /* -------------------------------------------------------------------- */ /* Or generate from all configured raster output formats that */ /* look plausible. */ From 4538f8eb32a2e49e7fd90f92e66f88dece9bfd45 Mon Sep 17 00:00:00 2001 From: Fabian Schindler Date: Wed, 30 May 2012 15:37:02 +0200 Subject: [PATCH 3/3] Removed advertising of supported formats in WCS 2.0 CoverageDescriptions as this is not included in the standard. --- mapwcs20.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mapwcs20.c b/mapwcs20.c index 912c03f9b5..f0e252e8e6 100644 --- a/mapwcs20.c +++ b/mapwcs20.c @@ -3279,7 +3279,8 @@ static int msWCSDescribeCoverage20_CoverageDescription(mapObj *map, /* -------------------------------------------------------------------- */ /* SupportedFormats */ /* -------------------------------------------------------------------- */ - { + /* for now, WCS 2.0 does not allow per coverage format definitions */ + /*{ xmlNodePtr psSupportedFormats; char *format_list; @@ -3295,7 +3296,7 @@ static int msWCSDescribeCoverage20_CoverageDescription(mapObj *map, } msFree(format_list); - } + }*/ /* -------------------------------------------------------------------- */ /* nativeFormat */