[mapserver-commits] r9768 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Mon Feb 1 17:04:24 EST 2010
Author: pramsey
Date: 2010-02-01 17:04:23 -0500 (Mon, 01 Feb 2010)
New Revision: 9768
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapwms.c
Log:
Add support for the WMS capabilities items AuthorityURL, Identifier (#3251)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2010-01-29 18:50:11 UTC (rev 9767)
+++ trunk/mapserver/HISTORY.TXT 2010-02-01 22:04:23 UTC (rev 9768)
@@ -14,6 +14,8 @@
Current Version (SVN trunk):
----------------------------
+- Add support for the WMS capabilities items AuthorityURL, Identifier (#3251)
+
- Added support to write a null shape in a shape file. (#3277)
- Apply ON_MISSING_DATA to zero-length WMS client calls (#2785, #3243)
Modified: trunk/mapserver/mapwms.c
===================================================================
--- trunk/mapserver/mapwms.c 2010-01-29 18:50:11 UTC (rev 9767)
+++ trunk/mapserver/mapwms.c 2010-02-01 22:04:23 UTC (rev 9768)
@@ -1584,6 +1584,47 @@
MS_FALSE, MS_FALSE, MS_FALSE, MS_TRUE, MS_TRUE,
NULL, NULL, NULL, NULL, NULL, " ");
+ /* AuthorityURL support and Identifier support, only available > WMS 1.1.0 */
+ if(nVersion >= OWS_1_1_0)
+ {
+ const char *pszWmsAuthorityName = msOWSLookupMetadata(&(lp->metadata), "MO", "authorityurl_name");
+ const char *pszWMSAuthorityHref = msOWSLookupMetadata(&(lp->metadata), "MO", "authorityurl_href");
+ const char *pszWMSIdentifierAuthority = msOWSLookupMetadata(&(lp->metadata), "MO", "identifier_authority");
+ const char *pszWMSIdentifierValue = msOWSLookupMetadata(&(lp->metadata), "MO", "identifier_value");
+
+ /* AuthorityURL only makes sense if you have *both* the name and url */
+ if( pszWmsAuthorityName && pszWMSAuthorityHref )
+ {
+ msOWSPrintEncodeMetadata(stdout, &(lp->metadata), "MO", "authorityurl_name",
+ OWS_NOERR, " <AuthorityURL name=\"%s\">\n",
+ NULL);
+ msOWSPrintEncodeMetadata(stdout, &(lp->metadata), "MO", "authorityurl_href",
+ OWS_NOERR, " <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"%s\"/>\n",
+ NULL);
+ msIO_printf(" </AuthorityURL>\n");
+ }
+ else if ( pszWmsAuthorityName || pszWMSAuthorityHref )
+ {
+ msIO_printf(" <!-- WARNING: Both wms_authorityurl_name and wms_authorityurl_href must be set to output an AuthorityURL -->\n");
+ }
+ /* Identifier only makes sense if you have *both* the authority and value */
+ if( pszWMSIdentifierAuthority && pszWMSIdentifierValue )
+ {
+ msOWSPrintEncodeMetadata(stdout, &(lp->metadata), "MO", "identifier_authority",
+ OWS_NOERR, " <Identifier authority=\"%s\">",
+ NULL);
+ msOWSPrintEncodeMetadata(stdout, &(lp->metadata), "MO", "identifier_value",
+ OWS_NOERR, "%s</Identifier>\n>",
+ NULL);
+ }
+ else if ( pszWMSIdentifierAuthority || pszWMSIdentifierValue )
+ {
+ msIO_printf(" <!-- WARNING: Both wms_identifier_authority and wms_identifier_value must be set to output an Identifier -->\n");
+ }
+
+ }
+
+
/* The LegendURL reside in a style. The Web Map Context spec already */
/* included the support on this in mapserver. However, it is not in the */
/* wms_legendurl_... metadatas it's in the styles metadata, */
More information about the mapserver-commits
mailing list