[mapserver-commits] r7890 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Aug 27 15:04:50 EDT 2008


Author: tomkralidis
Date: 2008-08-27 15:04:50 -0400 (Wed, 27 Aug 2008)
New Revision: 7890

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapogcsos.c
Log:
various SOS updates for CITE compliance (#2646)


Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2008-08-27 13:26:50 UTC (rev 7889)
+++ trunk/mapserver/HISTORY.TXT	2008-08-27 19:04:50 UTC (rev 7890)
@@ -12,6 +12,8 @@
 Current Version (5.3-dev, SVN trunk):
 ------------------------------------
 
+- various SOS updates for CITE compliance (#2646)
+
 - Added support for static linking with the lib gd in configure 
   script (#2696)
 

Modified: trunk/mapserver/mapogcsos.c
===================================================================
--- trunk/mapserver/mapogcsos.c	2008-08-27 13:26:50 UTC (rev 7889)
+++ trunk/mapserver/mapogcsos.c	2008-08-27 19:04:50 UTC (rev 7890)
@@ -756,12 +756,16 @@
                                        "observedProperty_id");
         if (pszValue)
         {
-            psNode= xmlNewChild(psObsNode, NULL, BAD_CAST "observedProperty", BAD_CAST pszValue);
-             xmlSetNs(psNode,xmlNewNs(psNode, NULL,  NULL));
+            //psNode= xmlNewChild(psObsNode, psNsOm, BAD_CAST "observedProperty", BAD_CAST pszValue);
+            msSOSAddPropertyNode(psNsSwe, psNsXLink, psObsNode, lp, psNsGml);
+
         }
 
         /*TODO add featureofinterest*/
 
+        psNode =  xmlNewChild(psObsNode, psNsOm, BAD_CAST "featureOfInterest", NULL);
+        xmlNewNsProp(psNode, psNsXLink, BAD_CAST "href", BAD_CAST "urn:ogc:foo");
+
         /* add result : gml:featureMember of all selected elements */
         psNode = xmlNewChild(psObsNode, NULL, BAD_CAST "result", NULL);
 
@@ -2665,6 +2669,21 @@
   return msSOSException(map, "procedure", "InvalidParameterValue");
 }
 
+/************************************************************************/
+/*                           msSOSDescribeObsrvationType                */
+/*                                                                      */
+/*      DescribeObservationType request handler                         */
+/************************************************************************/
+int msSOSDescribeObservationType(mapObj *map, sosParamsObj *sosparams) {
+  if (!sosparams->pszObservedProperty) {
+    msSetError(MS_SOSERR, "Missing mandatory parameter observedProperty", "msSOSDescribeObservationType()");
+    return msSOSException(map, "observedproperty", "MissingParameterValue");
+  }
+  msSetError(MS_SOSERR, "Not yet implemented", "msSOSDescribeObservationType()");
+  return msSOSException(map, "mapserv", "NoApplicableCode");
+}
+
+
 #endif /* defined(USE_WCS_SVR) && defined(USE_LIBXML2) */
 
 /*
@@ -2698,7 +2717,10 @@
       return returnvalue;
     }
 
-    else if (strcasecmp(paramsObj->pszRequest, "DescribeSensor") == 0 || strcasecmp(paramsObj->pszRequest, "GetObservation") == 0) { 
+    else if (strcasecmp(paramsObj->pszRequest, "DescribeSensor") == 0 ||
+             strcasecmp(paramsObj->pszRequest, "GetObservation") == 0 ||
+             strcasecmp(paramsObj->pszRequest, "DescribeObservationType") == 0
+    ) { 
       /* check version */
       if (!paramsObj->pszVersion) {
         msSetError(MS_SOSERR, "Missing VERSION parameter", "msSOSDispatch()");
@@ -2722,6 +2744,9 @@
       else if (strcasecmp(paramsObj->pszRequest, "GetObservation") == 0)
         returnvalue = msSOSGetObservation(map, paramsObj);
 
+      else if (strcasecmp(paramsObj->pszRequest, "DescribeObservationType") == 0)
+        returnvalue = msSOSDescribeObservationType(map, paramsObj);
+
       msSOSFreeParamsObj(paramsObj);
       free(paramsObj);
       paramsObj = NULL;
@@ -2865,6 +2890,11 @@
     if (psXPathTmp)
       sosparams->pszRequest = strdup("GetObservation");
 
+    psXPathTmp = msLibXml2GetXPath(doc, context, (xmlChar *)"/sos:DescribeObservationType");
+
+    if (psXPathTmp)
+      sosparams->pszRequest = strdup("DescribeObservationType");
+
     xmlXPathFreeObject(psXPathTmp);
 
     /* check for outputformat */



More information about the mapserver-commits mailing list