[mapserver-commits] r9854 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Sun Feb 21 18:48:57 EST 2010


Author: dmorissette
Date: 2010-02-21 18:48:56 -0500 (Sun, 21 Feb 2010)
New Revision: 9854

Modified:
   trunk/mapserver/mapwms.c
Log:
Fixed invalid warning when map has a valid EPSG proj, but layer doesn't (#2028)

Modified: trunk/mapserver/mapwms.c
===================================================================
--- trunk/mapserver/mapwms.c	2010-02-21 23:26:27 UTC (rev 9853)
+++ trunk/mapserver/mapwms.c	2010-02-21 23:48:56 UTC (rev 9854)
@@ -1453,9 +1453,10 @@
    if (msOWSGetEPSGProj(&(map->projection),&(map->web.metadata),
                         "MO", MS_FALSE) == NULL)
    {
-       /* starting 1.1.1 SRS are given in individual tags */
+       /* If map has no proj then every layer MUST have one or produce a warning */
        if (nVersion > OWS_1_1_0)
        {
+           /* starting 1.1.1 SRS are given in individual tags */
            if (nVersion >= OWS_1_3_0)
              msOWSPrintEncodeParamList(stdout, "(at least one of) "
                                        "MAP.PROJECTION, LAYER.PROJECTION "
@@ -1476,7 +1477,6 @@
                                      "        <SRS>%s</SRS>\n", NULL);
        }
        else
-         /* If map has no proj then every layer MUST have one or produce a warning */
          msOWSPrintEncodeParam(stdout, "(at least one of) MAP.PROJECTION, "
                                "LAYER.PROJECTION or wms_srs metadata",
                                msOWSGetEPSGProj(&(lp->projection),
@@ -1485,9 +1485,10 @@
    }
    else
    {
-       /* starting 1.1.1 SRS are given in individual tags */
+       /* No warning required in this case since there's at least a map proj. */
        if (nVersion > OWS_1_1_0)
        {
+           /* starting 1.1.1 SRS are given in individual tags */
            if (nVersion >=  OWS_1_3_0)
              msOWSPrintEncodeParamList(stdout, "(at least one of) "
                                      "MAP.PROJECTION, LAYER.PROJECTION "
@@ -1495,7 +1496,7 @@
                                      msOWSGetEPSGProj(&(lp->projection), 
                                                       &(lp->metadata),
                                                       "MO", MS_FALSE),
-                                     OWS_WARN, ' ', NULL, NULL, 
+                                     OWS_NOERR, ' ', NULL, NULL, 
                                      "        <CRS>%s</CRS>\n", NULL);
            else
              msOWSPrintEncodeParamList(stdout, "(at least one of) "
@@ -1504,11 +1505,10 @@
                                      msOWSGetEPSGProj(&(lp->projection), 
                                                       &(lp->metadata),
                                                       "MO", MS_FALSE),
-                                     OWS_WARN, ' ', NULL, NULL, 
+                                     OWS_NOERR, ' ', NULL, NULL, 
                                      "        <SRS>%s</SRS>\n", NULL);
        }
        else
-       /* No warning required in this case since there's at least a map proj. */
          msOWSPrintEncodeParam(stdout,
                                " LAYER.PROJECTION (or wms_srs metadata)",
                                msOWSGetEPSGProj(&(lp->projection),



More information about the mapserver-commits mailing list