[mapserver-commits] r10639 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Oct 21 22:29:31 EDT 2010


Author: warmerdam
Date: 2010-10-21 19:29:31 -0700 (Thu, 21 Oct 2010)
New Revision: 10639

Modified:
   trunk/mapserver/mapfile.c
Log:
add FEATURE as an IMAGEMODE (#3570)

Modified: trunk/mapserver/mapfile.c
===================================================================
--- trunk/mapserver/mapfile.c	2010-10-21 13:27:54 UTC (rev 10638)
+++ trunk/mapserver/mapfile.c	2010-10-22 02:29:31 UTC (rev 10639)
@@ -4010,7 +4010,7 @@
       free(value); value=NULL;
       break;
     case(IMAGEMODE):
-      if(getString(&value) == MS_FAILURE) return(-1);
+      value = getToken();
       if( strcasecmp(value,"PC256") == 0 )
           imagemode = MS_IMAGEMODE_PC256;
       else if( strcasecmp(value,"RGB") == 0 )
@@ -4023,10 +4023,12 @@
           imagemode = MS_IMAGEMODE_FLOAT32;
       else if( strcasecmp(value,"BYTE") == 0)
           imagemode = MS_IMAGEMODE_BYTE;
+      else if( strcasecmp(value,"FEATURE") == 0)
+          imagemode = MS_IMAGEMODE_FEATURE;
       else
       {
           msSetError(MS_IDENTERR, 
-                     "Parsing error near (%s):(line %d), expected PC256, RGB, RGBA, BYTE, INT16, or FLOAT32 for IMAGEMODE.", "loadOutputFormat()", 
+                     "Parsing error near (%s):(line %d), expected PC256, RGB, RGBA, FEATURE, BYTE, INT16, or FLOAT32 for IMAGEMODE.", "loadOutputFormat()", 
                      msyytext, msyylineno);      
           return -1;
       }
@@ -4057,7 +4059,7 @@
   writeString(stream, indent, "MIMETYPE", NULL, outputformat->mimetype);
   writeString(stream, indent, "DRIVER", NULL, outputformat->driver);
   writeString(stream, indent, "EXTENSION", NULL, outputformat->extension);
-  writeKeyword(stream, indent, "IMAGEMODE", outputformat->imagemode, 6, MS_IMAGEMODE_PC256, "PC256", MS_IMAGEMODE_RGB, "RGB", MS_IMAGEMODE_RGBA, "RGBA", MS_IMAGEMODE_INT16, "INT16", MS_IMAGEMODE_FLOAT32, "FLOAT32", MS_IMAGEMODE_BYTE, "BYTE");
+  writeKeyword(stream, indent, "IMAGEMODE", outputformat->imagemode, 6, MS_IMAGEMODE_PC256, "PC256", MS_IMAGEMODE_RGB, "RGB", MS_IMAGEMODE_RGBA, "RGBA", MS_IMAGEMODE_INT16, "INT16", MS_IMAGEMODE_FLOAT32, "FLOAT32", MS_IMAGEMODE_BYTE, "BYTE", MS_IMAGEMODE_FEATURE, "FEATURE");
   writeKeyword(stream, indent, "TRANSPARENT", outputformat->transparent, 2, MS_TRUE, "TRUE", MS_FALSE, "FALSE");
   for (i=0; i<outputformat->numformatoptions; i++) 
     writeString(stream, indent, "FORMATOPTION", NULL, outputformat->formatoptions[i]);



More information about the mapserver-commits mailing list