[Mapserver-users] Class Expression help

Nick Petersen-Bergeron bergeron at zedxinc.com
Thu Jul 17 08:22:33 PDT 2003


As a followup, when I quote the column name, I get the error:
Thu Jul 17 11:29:04 2003 - msEvalExpression(): General error message. 
Cannot evaluate expression, no item index defined.

While this error seems more pertinent, an Item Index shouldn't be necessary 
should it?





At 05:01 PM 7/17/2003 +0200, Vincent Schut wrote:
>Nick,
>jsut a guess, but have you tried it with [LEVEL] and [DAY] single quoted too?
>I think you always need to quote your attribute column names.
>
>Regards,
>Vincent.
>
>On Thursday 17 July 2003 16:50, Nick Petersen-Bergeron wrote:
> > I'm trying to do a class based layer structure for a map program I'm
> > writing.  I've looked through all of the syntax examples for expressions
> > that I can find, but can't seem to figure out what's wrong.
> >
> > I have around 20 classes in the layer.  Essentially the only thing that
> > will differ between classes is the color.
> >
> > I've included an example of one of the classes.
> >
> > CLASS
> >                  EXPRESSION "(('[TEMP]' eq 'normal') AND ('[PRECIP]' eq
> > 'normal') AND ([LEVEL] eq 0) AND ([DAY] eq 30))"
> >                  COLOR 50 50 50
> >                  SIZE 5
> >                  NAME "normal_city"
> >                  SYMBOL "circle"
> >                  LABEL
> >                          COLOR 50 50 50
> >                          FONT arial
> >                          SIZE 12
> >                          POSITION ur
> >                          ANTIALIAS TRUE
> >                          TYPE TRUETYPE
> >                  END
> >          END
> >
> > Can anyone see a problem with this?
> >
> > When I comment out a single expression, the shapefile I'm using defaults to
> > using that class, so I'm guessing that none of the expressions are
> > evaluating to true.  However, the dbf for the shape seems to indicate that
> > this should not be the case.  The only error being thrown is the following:
> >
> >
> > Thu Jul 17 10:41:37 2003 - msSearchDiskTree(): Unable to access file.
> > Unable to open spatial index for /home/wcs/html/data/countries2.qix. In
> > most cases you can safely ignore this message, otherwise check file names
> > and permissions.
> >
> >
> > Thanks for your help.

Nick Petersen-Bergeron
System Administrator

ZedX Inc.
369 Rolling Ridge Drive
Bellefonte, PA. 16823




More information about the MapServer-users mailing list