[mapserver-users] Expression statement (FWD)

Mark Giesbrecht mgiesbrecht at geoarctic.com
Mon Jan 14 18:35:47 EST 2002


Hi Teb,

If I'm not mistaken, I think that the field within the square brackets [] must
be uppercase.  There are also two other things you may want to check out:

1.  It may sound silly, but if Grid_code is defined within the dbf as a
string, you'll want to encapsulate -9999 in single quotes.
2.  Another silly thing; be sure of your EXTENTS; if your expression proves
true, but does not show, it could be that you're off in another part of the
world.

Hope this helps,

Mark

teb wrote:

> ------------- Begin Forwarded Message -------------
>
> X-Sender: geo402 at mailms.abdn.ac.uk
> Date: Mon, 14 Jan 2002 16:58:06 +0000
> To: mapserver-info at lists.gis.umn.edu
> From: "Stephen D. King" <s.d.king at abdn.ac.uk>
> Subject: Expression statement
> Mime-Version: 1.0
> X-Scanner: exiscan *16QAUW-0003fz-00*CIeUL4fe4fk*
>
> Hi,
>
> I am trying to get mapserver to display classes from one shapefile -
> without success - I just get a blank image. I can get it to display the
> shapefile without the class divisions.
>
> The shapefile is called Gr_nhs.shp
>
> It is divided up into 23 classes. Each class takes its value from the
> Grid_code attribute field. -9999 is unknown, the remaining values are from
> 1-22
>
> In my map file, the layer definition is as follows:
>
> LAYER
>         NAME Gr_nhs
>         TYPE POLYGON
>         STATUS DEFAULT
>         DATA Gr_nhs
>         CLASSITEM "Grid_code"
>
> CLASS
>         Name "Unknown"
>         EXPRESSION ([Grid_code] eq -9999)
>         COLOR 210 275 25
> END
> END
> END # Map file
>
> I have tried various combinations for the expression - can anyone help?
>
> Thanks,
>
> Stephen
>
> ------------- End Forwarded Message -------------

--
Mark Giesbrecht, M.Sc.
GIS Programmer/Analyst
ER Mapper Technical Support
GeoArctic International Services Ltd.
mgiesbrecht at geoarctic.com http://www.geoarctic.com
phone: (403) 290-1320  fax:  (403) 264-5848






More information about the mapserver-users mailing list