[mapserver-commits] r8189 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Dec 3 13:48:26 EST 2008


Author: tomkralidis
Date: 2008-12-03 13:48:26 -0500 (Wed, 03 Dec 2008)
New Revision: 8189

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapogcsos.c
Log:
Cleanup warning and error messages


Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2008-12-03 16:55:58 UTC (rev 8188)
+++ trunk/mapserver/HISTORY.TXT	2008-12-03 18:48:26 UTC (rev 8189)
@@ -11,6 +11,9 @@
 
 Current Version (5.3-dev, SVN trunk):
 ------------------------------------
+
+- mapogcsos.c: Cleanup warning and error messages
+
 - mapagg.cpp: Fix center of rotation for truetype marker symbols 
 
 - mapowscommon.c: use msLibXml2GenerateList to generate listed XML elements

Modified: trunk/mapserver/mapogcsos.c
===================================================================
--- trunk/mapserver/mapogcsos.c	2008-12-03 16:55:58 UTC (rev 8188)
+++ trunk/mapserver/mapogcsos.c	2008-12-03 18:48:26 UTC (rev 8189)
@@ -997,7 +997,7 @@
          psObsNode = xmlNewChild(psMemberNode, NULL, BAD_CAST "Observation", NULL);
 
         /*time*/
-         /* ??TODO : sampling time is a manadatory element but uses a non manadtor metada offering_timeextent */
+         /* ??TODO : sampling time is a manadatory element but uses a non mandatory metadata sos_offering_timeextent */
          value = msOWSLookupMetadata(&(lp->metadata), "S", "offering_timeextent");
          if (value)
          {
@@ -1006,9 +1006,9 @@
              char *pszEndTime = NULL;
              tokens = msStringSplit(value, '/', &n);
              if (tokens==NULL || (n != 1 && n!=2)) {
-                 msSetError(MS_SOSERR, "Wrong number of arguments for offering_timeextent.",
+                 msSetError(MS_SOSERR, "Wrong number of arguments for sos_offering_timeextent.",
                             "msSOSGetObservation()");
-                 msSOSException(map, "offering_timeextent", "InvalidParameterValue");
+                 msSOSException(map, "sos_offering_timeextent", "InvalidParameterValue");
                  return NULL;
              }
 
@@ -1407,7 +1407,7 @@
                  if (value)
                      psNode = xmlNewChild(psOfferingNode, psNsGml, BAD_CAST "name", BAD_CAST value);
                  else
-                     xmlAddSibling(psNode, xmlNewComment(BAD_CAST "WARNING: Optional metadata \"sos_name\" missing for gml:name"));
+                     xmlAddSibling(psNode, xmlNewComment(BAD_CAST "WARNING: Optional metadata \"sos_offering_name\" missing for gml:name"));
 
                  /* srsName */                 
                  value = msOWSLookupMetadata(&(map->web.metadata), "SO", "srs");
@@ -1427,9 +1427,9 @@
                      int n;
                      tokens = msStringSplit(value, ',', &n);
                      if (tokens==NULL || n != 4) {
-                         msSetError(MS_SOSERR, "Wrong number of arguments for offering_extent.",
+                         msSetError(MS_SOSERR, "Wrong number of arguments for sos_offering_extent.",
                                     "msSOSGetCapabilities()");
-                         return msSOSException(map, "offering_extent", "InvalidParameterValue");
+                         return msSOSException(map, "sos_offering_extent", "InvalidParameterValue");
                      }
                      value = msOWSGetEPSGProj(&(lp->projection),
                                               &(lp->metadata), "SO", MS_TRUE);
@@ -1446,7 +1446,7 @@
                  if (value)
                      psNode = xmlNewChild(psOfferingNode, psNsSos, BAD_CAST "intendedApplication", BAD_CAST value);
                  else
-                     xmlAddSibling(psNode, xmlNewComment(BAD_CAST "WARNING: Optional metadata \"sos_intendedapplication\" missing for sos:intendedApplication"));
+                     xmlAddSibling(psNode, xmlNewComment(BAD_CAST "WARNING: Optional metadata \"sos_offering_intendedapplication\" missing for sos:intendedApplication"));
 
                  /*time*/
                  value = msOWSLookupMetadata(&(lp->metadata), "S", 
@@ -1458,9 +1458,9 @@
                      char *pszEndTime = NULL;
                      tokens = msStringSplit(value, '/', &n);
                      if (tokens==NULL || (n != 1 && n!=2)) {
-                         msSetError(MS_SOSERR, "Wrong number of arguments for offering_timeextent.",
+                         msSetError(MS_SOSERR, "Wrong number of arguments for sos_offering_timeextent.",
                                     "msSOSGetCapabilities()");
-                         return msSOSException(map, "offering_timeextent", "InvalidParameterValue");
+                         return msSOSException(map, "sos_offering_timeextent", "InvalidParameterValue");
                      }
 
                      if (n == 2) /* end time is empty. It is going to be set as "now*/
@@ -2328,9 +2328,9 @@
 
        tokens = msStringSplit(pszTmp, ',', &n);
        if (tokens==NULL || n != 4) {
-          msSetError(MS_SOSERR, "Wrong number of arguments for offering_extent.",
+          msSetError(MS_SOSERR, "Wrong number of arguments for sos_offering_extent.",
           "msSOSGetCapabilities()");
-          return msSOSException(map, "offering_extent", "InvalidParameterValue");
+          return msSOSException(map, "sos_offering_extent", "InvalidParameterValue");
        }
 
        envelope.minx = atof(tokens[0]);
@@ -2341,7 +2341,7 @@
        if (map && msProjectionsDiffer(&map->projection, &lp->projection) == MS_TRUE) {
          if (msProjectRect(&lp->projection, &map->projection, &envelope) == MS_FAILURE){ 
            msSetError(MS_SOSERR, "Coordinates transformation failed.  Raised in msProjectRect() of file %s line %d", "msSOSGetCapabilities()", __FILE__, __LINE__);
-           return msSOSException(map, "offering_extent", "InvalidParameterValue");
+           return msSOSException(map, "sos_offering_extent", "InvalidParameterValue");
          }
        }
 
@@ -2358,9 +2358,9 @@
         char *pszEndTime = NULL;
         tokens = msStringSplit(pszTmp, '/', &n);
         if (tokens==NULL || (n != 1 && n!=2)) {
-            msSetError(MS_SOSERR, "Wrong number of arguments for offering_timeextent.",
+            msSetError(MS_SOSERR, "Wrong number of arguments for sos_offering_timeextent.",
                        "msSOSGetCapabilities()");
-            return msSOSException(map, "offering_timeextent", "InvalidParameterValue");
+            return msSOSException(map, "sos_offering_timeextent", "InvalidParameterValue");
         }
     */ 
     /*    if (n == 2) */ /* end time is empty. It is going to be set as "now" */



More information about the mapserver-commits mailing list