Expressions in Java MapScript

Bas Vanmeulebrouk bvanmeul at EBE.UCT.AC.ZA
Tue Oct 4 05:34:40 EDT 2005


Hi list,

 

I have defined classes in a layer using expressions as shown below. 

Using the MapServer cgi-executable, the layer draws fine. However, using
Java MapScript I get an error "Failed to parse expression" when drawing the
layer. When I remove the expression and use a single class instead, the
layer draws fine. Does anyone know what I am doing wrong?

 

Kind regards,

 

Bas Vanmeulebrouk.

 

 

    CLASS

         NAME "100"

         EXPRESSION ([pct_piped_water] = 100)

        OUTLINECOLOR 110 110 110

        COLOR 56 168 0

      END

      CLASS

        NAME "95 - 100"

         EXPRESSION ([pct_piped_water] < 100 AND [pct_piped_water] >= 95)

        OUTLINECOLOR 110 110 110

        COLOR 176 224 0

      END

      CLASS

        NAME "90 - 95"

         EXPRESSION ([pct_piped_water] < 95 AND [pct_piped_water] ge 90)

        OUTLINECOLOR 110 110 110

        COLOR 255 170 0

      END

    CLASS

         NAME "< 90"

         EXPRESSION ([pct_piped_water] < 90)

        OUTLINECOLOR 110 110 110

        COLOR 255 0 0

      END

 

  END # End Piped water polygon layer

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20051004/5afabc3c/attachment.html


More information about the mapserver-users mailing list