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

svn at osgeo.org svn at osgeo.org
Sat Apr 10 11:26:28 EDT 2010


Author: warmerdam
Date: 2010-04-10 11:26:28 -0400 (Sat, 10 Apr 2010)
New Revision: 10093

Modified:
   branches/branch-5-6/mapserver/HISTORY.TXT
   branches/branch-5-6/mapserver/mapraster.c
Log:
improve the handling of simple string comparisons for raster query (#3425)

Modified: branches/branch-5-6/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-6/mapserver/HISTORY.TXT	2010-04-10 15:23:45 UTC (rev 10092)
+++ branches/branch-5-6/mapserver/HISTORY.TXT	2010-04-10 15:26:28 UTC (rev 10093)
@@ -15,6 +15,9 @@
 Version 5.6.4 (????-??-??):
 ---------------------------
  
+- Improve the handling of simple string comparisons for raster classified
+  values (#3425) 
+
 - Add the ogc namspace to filters generated by Mapserver (#3414)
 
 - Fix MS_NONSQUARE to work in mode=map (#3413)

Modified: branches/branch-5-6/mapserver/mapraster.c
===================================================================
--- branches/branch-5-6/mapserver/mapraster.c	2010-04-10 15:23:45 UTC (rev 10092)
+++ branches/branch-5-6/mapserver/mapraster.c	2010-04-10 15:26:28 UTC (rev 10093)
@@ -171,7 +171,12 @@
         switch(layer->class[i]->expression.type) {
           case(MS_STRING):
             sprintf(tmpstr2, "%18g", fValue );
-            if(strcmp(layer->class[i]->expression.string, tmpstr2) == 0) return(i); /* matched */
+            /* trim junk white space */
+            tmpstr1= tmpstr2;
+            while( *tmpstr1 == ' ' )
+                tmpstr1++;
+
+            if(strcmp(layer->class[i]->expression.string, tmpstr1) == 0) return(i); /* matched */
             break;
 
           case(MS_REGEX):



More information about the mapserver-commits mailing list