[mapserver-commits] r7310 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Jan 25 07:32:31 EST 2008


Author: tomkralidis
Date: 2008-01-25 07:32:31 -0500 (Fri, 25 Jan 2008)
New Revision: 7310

Modified:
   trunk/mapserver/mapogcsos.c
Log:
more fixes for SOS 1.0.0 support (#2246)


Modified: trunk/mapserver/mapogcsos.c
===================================================================
--- trunk/mapserver/mapogcsos.c	2008-01-24 14:11:10 UTC (rev 7309)
+++ trunk/mapserver/mapogcsos.c	2008-01-25 12:32:31 UTC (rev 7310)
@@ -312,7 +312,7 @@
 {
     const char *pszValue = NULL, *pszFullName = NULL;
     xmlNodePtr psCompNode, psNode;
-    int i;
+    int i, j=0;
     char szTmp[256];
 
     if (psParent && lp)
@@ -349,15 +349,16 @@
                 /* check if there is an alias/full name used*/
                 sprintf(szTmp, "%s_alias", lp->items[i]);
                 pszFullName = msOWSLookupMetadata(&(lp->metadata), "S", szTmp);
-                if (pszFullName)
-                  xmlNewNsProp(psNode, NULL, BAD_CAST "name", BAD_CAST pszFullName);
-                else
-                  xmlNewNsProp(psNode, NULL, BAD_CAST "name", BAD_CAST lp->items[i]);
+                //if (pszFullName)
+                //  xmlNewNsProp(psNode, NULL, BAD_CAST "name", BAD_CAST pszFullName);
+                //else
+                //  xmlNewNsProp(psNode, NULL, BAD_CAST "name", BAD_CAST lp->items[i]);
 
                 xmlNewNsProp(psNode, psNsXLink, BAD_CAST "href", BAD_CAST pszValue);
+                j++;
             }
         }
-        xmlNewNsProp(psCompNode, NULL, BAD_CAST "dimension", BAD_CAST msIntToString(i));
+        xmlNewNsProp(psCompNode, NULL, BAD_CAST "dimension", BAD_CAST msIntToString(j));
     }	
 }
         
@@ -1052,7 +1053,6 @@
          else
            msSOSAddPropertyNode(psNsSwe, psNsXLink, psObsNode, lpfirst, psNsGml);
          
-         
          /* result definition*/
          psNode = xmlNewChild(psObsNode, NULL, BAD_CAST "resultDefinition", NULL);
          msSOSAddDataBlockDefinition(psNsSwe, psNode, lpfirst);
@@ -2155,27 +2155,27 @@
     }
 
     /* time */
-    pszTmp = msOWSLookupMetadata(&(lp->metadata), "S","offering_timeextent");
-    if (pszTmp)
-    {
-        char **tokens;
-        int n;
-        char *pszEndTime = NULL;
-        tokens = msStringSplit(pszTmp, '/', &n);
-        if (tokens==NULL || (n != 1 && n!=2)) {
-            msSetError(MS_SOSERR, "Wrong number of arguments for offering_timeextent.",
-                       "msSOSGetCapabilities()");
-            return msSOSException(map, "offering_timeextent", "InvalidParameterValue");
-        }
-
-        if (n == 2) /* end time is empty. It is going to be set as "now*/
-          pszEndTime = tokens[1];
-
+    //pszTmp = msOWSLookupMetadata(&(lp->metadata), "S","offering_timeextent");
+    //if (pszTmp)
+    //{
+    //    char **tokens;
+    //    int n;
+    //    char *pszEndTime = NULL;
+    //    tokens = msStringSplit(pszTmp, '/', &n);
+    //    if (tokens==NULL || (n != 1 && n!=2)) {
+    //        msSetError(MS_SOSERR, "Wrong number of arguments for offering_timeextent.",
+    //                   "msSOSGetCapabilities()");
+    //        return msSOSException(map, "offering_timeextent", "InvalidParameterValue");
+    //    }
+    //
+    //    if (n == 2) /* end time is empty. It is going to be set as "now*/
+    //      pszEndTime = tokens[1];
+    //
         //psNode = xmlAddChild(psRootNode, msSOSAddTimeNode(xmlNewNs(NULL, BAD_CAST pszOMNamespaceUri, BAD_CAST pszOMNamespacePrefix), tokens[0], pszEndTime));
-        psNode = xmlAddChild(psRootNode, msSOSAddTimeNode(psNsOm, psNsGml, tokens[0], pszEndTime));
-        msFreeCharArray(tokens, n);
-                     
-    }
+    //    psNode = xmlAddChild(psRootNode, msSOSAddTimeNode(psNsOm, psNsGml, tokens[0], pszEndTime));
+    //    msFreeCharArray(tokens, n);
+    //                 
+    //}
 
     if (sosparams->pszResultModel && strcasecmp(sosparams->pszResultModel, "om:Measurement") != 0 &&
         strcasecmp(sosparams->pszResultModel, "om:Observation") != 0)



More information about the mapserver-commits mailing list