[mapserver-commits] r10545 - branches/branch-5-6/mapserver

svn at osgeo.org svn at osgeo.org
Thu Sep 30 07:52:36 EDT 2010


Author: tamas
Date: 2010-09-30 11:52:36 +0000 (Thu, 30 Sep 2010)
New Revision: 10545

Modified:
   branches/branch-5-6/mapserver/HISTORY.TXT
   branches/branch-5-6/mapserver/mapogr.cpp
Log:
Fixed msOGRGetSymbolId according to the changes in gdal 1.8 (#3556)

Modified: branches/branch-5-6/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-6/mapserver/HISTORY.TXT	2010-09-30 11:04:28 UTC (rev 10544)
+++ branches/branch-5-6/mapserver/HISTORY.TXT	2010-09-30 11:52:36 UTC (rev 10545)
@@ -14,6 +14,8 @@
 Current Version
 ---------------
 
+- Fixed msOGRGetSymbolId according to the changes in gdal 1.8 (#3556)
+
 - Fixed crash when drawing a map using UNIQUE fid in the layer data (#3271)
 
 - Fixed Oracle Spatial Data gets corrupt (#3541)

Modified: branches/branch-5-6/mapserver/mapogr.cpp
===================================================================
--- branches/branch-5-6/mapserver/mapogr.cpp	2010-09-30 11:04:28 UTC (rev 10544)
+++ branches/branch-5-6/mapserver/mapogr.cpp	2010-09-30 11:52:36 UTC (rev 10545)
@@ -2719,14 +2719,21 @@
     int   numparams;
     int   nSymbol = -1;
 
-    if (pszSymbolId && pszSymbolId[0] != '\0' &&
-        (params = msStringSplit(pszSymbolId, '.', &numparams))!=NULL)
+    if (pszSymbolId && pszSymbolId[0] != '\0')
     {
-        for(int j=0; j<numparams && nSymbol == -1; j++)
+#if GDAL_VERSION_NUM >= 1800 /* Use comma as the separator */
+        params = msStringSplit(pszSymbolId, ',', &numparams);
+#else
+        params = msStringSplit(pszSymbolId, '.', &numparams);
+#endif
+        if (params != NULL)
         {
-            nSymbol = msGetSymbolIndex(symbolset, params[j], MS_FALSE);
+            for(int j=0; j<numparams && nSymbol == -1; j++)
+            {
+                nSymbol = msGetSymbolIndex(symbolset, params[j], MS_FALSE);
+            }
+            msFreeCharArray(params, numparams);
         }
-        msFreeCharArray(params, numparams);
     }
     if (nSymbol == -1 && pszDefaultSymbol)
     {



More information about the mapserver-commits mailing list