[mapserver-commits] r11159 - in trunk/msautotest/query: . expected

svn at osgeo.org svn at osgeo.org
Tue Mar 15 15:11:59 EDT 2011


Author: sdlime
Date: 2011-03-15 12:11:59 -0700 (Tue, 15 Mar 2011)
New Revision: 11159

Added:
   trunk/msautotest/query/expected/text_test001.png
   trunk/msautotest/query/expected/text_test002.png
   trunk/msautotest/query/expected/text_test003.png
   trunk/msautotest/query/expected/text_test004.png
   trunk/msautotest/query/expected/text_test005.png
   trunk/msautotest/query/expected/text_test006.png
   trunk/msautotest/query/expected/text_test007.png
   trunk/msautotest/query/text.map
Log:
A few regression tests related to text expressions.

Added: trunk/msautotest/query/expected/text_test001.png
===================================================================
(Binary files differ)


Property changes on: trunk/msautotest/query/expected/text_test001.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/msautotest/query/expected/text_test002.png
===================================================================
(Binary files differ)


Property changes on: trunk/msautotest/query/expected/text_test002.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/msautotest/query/expected/text_test003.png
===================================================================
(Binary files differ)


Property changes on: trunk/msautotest/query/expected/text_test003.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/msautotest/query/expected/text_test004.png
===================================================================
(Binary files differ)


Property changes on: trunk/msautotest/query/expected/text_test004.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/msautotest/query/expected/text_test005.png
===================================================================
(Binary files differ)


Property changes on: trunk/msautotest/query/expected/text_test005.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/msautotest/query/expected/text_test006.png
===================================================================
(Binary files differ)


Property changes on: trunk/msautotest/query/expected/text_test006.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/msautotest/query/expected/text_test007.png
===================================================================
(Binary files differ)


Property changes on: trunk/msautotest/query/expected/text_test007.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/msautotest/query/text.map
===================================================================
--- trunk/msautotest/query/text.map	                        (rev 0)
+++ trunk/msautotest/query/text.map	2011-03-15 19:11:59 UTC (rev 11159)
@@ -0,0 +1,197 @@
+#
+# Test Text Expressions
+#
+# REQUIRES: INPUT=SHAPEFILE OUTPUT=PNG
+#
+# RUN_PARMS: text_test001.png [SHP2IMG] -m [MAPFILE] -l text_test001 -o [RESULT]
+# RUN_PARMS: text_test002.png [SHP2IMG] -m [MAPFILE] -l text_test002 -o [RESULT]
+# RUN_PARMS: text_test003.png [SHP2IMG] -m [MAPFILE] -l text_test003 -o [RESULT]
+# RUN_PARMS: text_test004.png [SHP2IMG] -m [MAPFILE] -l text_test004 -o [RESULT]
+# RUN_PARMS: text_test005.png [SHP2IMG] -m [MAPFILE] -l text_test005 -o [RESULT]
+# RUN_PARMS: text_test006.png [SHP2IMG] -m [MAPFILE] -l text_test006 -o [RESULT]
+# RUN_PARMS: text_test007.png [SHP2IMG] -m [MAPFILE] -l text_test007 -o [RESULT]
+#
+MAP
+  NAME 'text'
+  EXTENT 125000 4785000 789000 5489000
+  UNITS METERS
+  
+  SIZE 300 300
+  IMAGETYPE PNG
+
+  #
+  # static text
+  #
+  LAYER
+    NAME 'text_test001'
+    DATA 'data/bdry_counpy2'
+    STATUS OFF
+    TYPE POLYGON
+    CLASSITEM 'CTY_NAME'
+    CLASS
+      EXPRESSION 'Aitkin'
+      STYLE 
+        COLOR 255 100 100 
+        OUTLINECOLOR 181 181 181
+      END
+      LABEL
+        SIZE MEDIUM
+        COLOR 0 0 0
+        OUTLINECOLOR 255 255 255
+      END
+      TEXT 'Static Text'
+    END
+    CLASS OUTLINECOLOR 181 181 181 END
+  END
+
+  #
+  # number run through default string conversion ("%g")
+  #
+  LAYER
+    NAME 'text_test002'
+    DATA 'data/bdry_counpy2'
+    STATUS OFF
+    TYPE POLYGON
+    CLASSITEM 'CTY_NAME'
+    CLASS
+      EXPRESSION 'Aitkin'
+      STYLE 
+        COLOR 255 100 100 
+        OUTLINECOLOR 181 181 181
+      END
+      LABEL
+        SIZE MEDIUM
+        COLOR 0 0 0
+        OUTLINECOLOR 255 255 255
+      END
+      TEXT ([area])
+    END
+    CLASS OUTLINECOLOR 181 181 181 END
+  END
+
+  #
+  # number as string
+  #
+  LAYER
+    NAME 'text_test003'
+    DATA 'data/bdry_counpy2'
+    STATUS OFF
+    TYPE POLYGON
+    CLASSITEM 'CTY_NAME'
+    CLASS
+      EXPRESSION 'Aitkin'
+      STYLE
+        COLOR 255 100 100
+        OUTLINECOLOR 181 181 181
+      END
+      LABEL
+        SIZE MEDIUM
+        COLOR 0 0 0
+        OUTLINECOLOR 255 255 255
+      END
+      TEXT ("[area]")
+    END
+    CLASS OUTLINECOLOR 181 181 181 END
+  END
+
+  #
+  # number converted to a string via function
+  #
+  LAYER
+    NAME 'text_test004'
+    DATA 'data/bdry_counpy2'
+    STATUS OFF
+    TYPE POLYGON
+    CLASSITEM 'CTY_NAME'
+    CLASS
+      EXPRESSION 'Aitkin'
+      STYLE
+        COLOR 255 100 100
+        OUTLINECOLOR 181 181 181
+      END
+      LABEL
+        SIZE MEDIUM
+        COLOR 0 0 0
+        OUTLINECOLOR 255 255 255
+      END
+      TEXT (tostring([area],"%.2f"))
+    END
+    CLASS OUTLINECOLOR 181 181 181 END
+  END
+
+  #
+  # compound label, static string and a dynamic value (accessed via function)
+  #
+  LAYER
+    NAME 'text_test005'
+    DATA 'data/bdry_counpy2'
+    STATUS OFF
+    TYPE POLYGON
+    CLASSITEM 'CTY_NAME'
+    CLASS
+      EXPRESSION 'Aitkin'
+      STYLE
+        COLOR 255 100 100
+        OUTLINECOLOR 181 181 181
+      END
+      LABEL
+        SIZE MEDIUM
+        COLOR 0 0 0
+        OUTLINECOLOR 255 255 255
+      END
+      TEXT ("Area is: " + tostring([area],"%.2f"))
+    END
+    CLASS OUTLINECOLOR 181 181 181 END
+  END
+
+  #
+  # compound label - substitution method
+  #
+  LAYER
+    NAME 'text_test006'
+    DATA 'data/bdry_counpy2'
+    STATUS OFF
+    TYPE POLYGON
+    CLASSITEM 'CTY_NAME'
+    CLASS
+      EXPRESSION 'Aitkin'
+      STYLE
+        COLOR 255 100 100
+        OUTLINECOLOR 181 181 181
+      END
+      LABEL
+        SIZE MEDIUM
+        COLOR 0 0 0
+        OUTLINECOLOR 255 255 255
+      END
+      TEXT "Area is: [area]"
+    END
+    CLASS OUTLINECOLOR 181 181 181 END
+  END
+
+  #
+  # work around for embedding []'s in a text string
+  #
+  LAYER
+    NAME 'text_test007'
+    DATA 'data/bdry_counpy2'
+    STATUS OFF
+    TYPE POLYGON
+    CLASSITEM 'CTY_NAME'
+    CLASS
+      EXPRESSION 'Aitkin'
+      STYLE
+        COLOR 255 100 100
+        OUTLINECOLOR 181 181 181
+      END
+      LABEL
+        SIZE MEDIUM
+        COLOR 0 0 0
+        OUTLINECOLOR 255 255 255
+      END
+      TEXT ("[work" + "around]")
+    END
+    CLASS OUTLINECOLOR 181 181 181 END
+  END
+
+END
\ No newline at end of file



More information about the mapserver-commits mailing list