[mapserver-commits] r8648 - branches/branch-5-4/mapserver

svn at osgeo.org svn at osgeo.org
Fri Mar 6 13:02:18 EST 2009


Author: assefa
Date: 2009-03-06 13:02:18 -0500 (Fri, 06 Mar 2009)
New Revision: 8648

Modified:
   branches/branch-5-4/mapserver/HISTORY.TXT
   branches/branch-5-4/mapserver/mapogcsld.c
Log:
Correct non validating sld #2915

Modified: branches/branch-5-4/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-4/mapserver/HISTORY.TXT	2009-03-06 14:45:14 UTC (rev 8647)
+++ branches/branch-5-4/mapserver/HISTORY.TXT	2009-03-06 18:02:18 UTC (rev 8648)
@@ -9,6 +9,11 @@
 
 For a complete change history, please see the Subversion log comments.
 
+Current Version:
+----------------
+
+- SLD: Correct non validating SLD (#2915)
+
 Version 5.4.0-beta3 (2009-3-5):
 --------------------------------
 

Modified: branches/branch-5-4/mapserver/mapogcsld.c
===================================================================
--- branches/branch-5-4/mapserver/mapogcsld.c	2009-03-06 14:45:14 UTC (rev 8647)
+++ branches/branch-5-4/mapserver/mapogcsld.c	2009-03-06 18:02:18 UTC (rev 8648)
@@ -3435,7 +3435,7 @@
                         
                         if (psLayer->type == MS_LAYER_POINT)
                         {
-                            if (psSymbol->filled)
+                            if (psSymbol->filled || bFillColor)
                             {
                                 sprintf(szTmp, "<%sFill>\n", sNameSpace);
                                 pszSLD = msStringConcatenate(pszSLD, szTmp);
@@ -3620,18 +3620,20 @@
                         psStyle->outlinecolor.blue,
                         sCssParam);
                 pszSLD = msStringConcatenate(pszSLD, szTmp);
-                sprintf(szTmp, "</%sStroke>\n", sCssParam);
+                sprintf(szTmp, "</%sStroke>\n", sNameSpace);
                 pszSLD = msStringConcatenate(pszSLD, szTmp);
                 bColorAvailable = 1;
             }
             if (!bColorAvailable)
             {       
                 /* default color */
+                sprintf(szTmp, "<%sFill>\n", sNameSpace);
+                pszSLD = msStringConcatenate(pszSLD, szTmp);
                 sprintf(szTmp, 
                         "<%s name=\"fill\">%s</%s>\n",
                         sCssParam, "#808080", sCssParam);
                 pszSLD = msStringConcatenate(pszSLD, szTmp);
-                sprintf(szTmp, "</%sFill>\n", sCssParam);
+                sprintf(szTmp, "</%sFill>\n", sNameSpace);
                 pszSLD = msStringConcatenate(pszSLD, szTmp);
             }
 
@@ -3723,8 +3725,14 @@
         pszGraphicSLD = NULL;
     }
 
-    sprintf(szHexColor,"%02x%02x%02x",psStyle->color.red,
-            psStyle->color.green,psStyle->color.blue);
+    if (psStyle->color.red != -1 && 
+        psStyle->color.green != -1 &&
+        psStyle->color.blue != -1)
+      sprintf(szHexColor,"%02x%02x%02x",psStyle->color.red,
+              psStyle->color.green,psStyle->color.blue);
+    else
+      sprintf(szHexColor,"%02x%02x%02x",psStyle->outlinecolor.red,
+              psStyle->outlinecolor.green,psStyle->outlinecolor.blue);
                             
     sprintf(szTmp, 
             "<%s name=\"stroke\">#%s</%s>\n", 
@@ -4276,7 +4284,7 @@
             
             
             msFree(pszEncoded);
-            pszFinalSLD = msStringConcatenate(pszFinalSLD, szTmp);
+            pszFinalSLD = msStringConcatenate(pszFinalSLD, pszTmpName);
             msFree(pszTmpName);
             pszTmpName=NULL;
 



More information about the mapserver-commits mailing list