<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Hi all,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have a great problem.&nbsp; </FONT></DIV>
<DIV><FONT face=Arial size=2>I have a shape file layer of some roads.&nbsp; All 
the different road types are in the same shape file, and Attibute data is used 
to specify the road type.&nbsp; I have a attribute/column named TYPE.&nbsp; The 
data here ... eg road types are Paved,Unpaved, Dirt Road, etc</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Now what I want is to filter out the road types I 
dont want.&nbsp; For this I was assuming the FILTER paramenter under the layer 
could work.</FONT></DIV>
<DIV><FONT face=Arial size=2>I have now tried numerous things but nothing much 
works.&nbsp; I see lots of others having problems with this.&nbsp; Reading posts 
here I see lots of conflicting info.&nbsp; Some also say you can do the same 
with the EXPRESSION parameter under your class.</FONT></DIV>
<DIV><FONT face=Arial size=2>Now I am totally confused.&nbsp; I have tired 
things like</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>
<DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>FILTER "([TYPE]='Paved' or 
[TYPE]='Unpaved')"</FONT></DIV>FILTER "([TYPE] eq 'Paved' or [TYPE] eq 
'Unpaved')"</FONT></DIV></DIV></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>To try and show only paved and unpaved 
roads.</FONT></DIV>
<DIV><FONT face=Arial size=2>I get nothing .. not a single thing shows up.&nbsp; 
Yet if I remove the filter parameter, all the roads types show.</FONT></DIV>
<DIV><FONT face=Arial size=2>So I also tried</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>FILTER "([TYPE]='Paved')" 
<DIV><FONT face=Arial size=2>FILTER "([TYPE] eq 'Paved')"</FONT></DIV>
<DIV>
<DIV>
<DIV><FONT face=Arial size=2>FILTER ([TYPE]='Paved') 
<DIV><FONT face=Arial size=2>FILTER ([TYPE] eq 'Paved')</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>I get same result .. nothing shows when the filter is present.</DIV>
<DIV>However, I have managed to get one thing working:</DIV>
<DIV>&nbsp;</DIV>
<DIV>FILTERITEM "TYPE"</DIV>
<DIV>FILTER "Paved"</DIV>
<DIV>&nbsp;</DIV>
<DIV>This works in that it shows only paved roads.&nbsp; Yet the moment I try 
and get it to work on more than one roadtype, it freaks out and shows 
nothing.&nbsp; I tried doing similar things with the Expression parameter but 
also with no results.</DIV>
<DIV>&nbsp;</DIV>
<DIV>My Layer looks like this:</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>LAYER<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME 
"tr_ro_final"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE 
line<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONNECTIONTYPE 
OGR<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONNECTION 
"/maps/tr_ro_final.shp"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS 
DEFAULT<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #FILTER "[TYPE] eq 
'Unpaved'"<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #FILTERITEM 
"TYPE"<BR><BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #FILTER '!"Dirt 
Road"'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #MINSCALE&nbsp; 
3.01<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #MAXSCALE 
99.01<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#Expression ([TYPE] eq "Unpaved")<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #COLOR 151 75 0<BR>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; COLOR 255 0 
0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
SYMBOL 
"circle"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
SIZE 3<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<BR>END<BR></DIV>
<DIV>As you can see I have still left in some of the things I was playing 
with.&nbsp; Still .. I have not got far.&nbsp; I have not been able to find any 
proper documentation of using mapserver regex or using the filter parameter 
properly. </DIV>
<DIV>&nbsp;</DIV>
<DIV>My mapserver version:</DIV>
<DIV>&nbsp;</DIV>
<DIV>MapServer version 4.4.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ 
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE<BR></DIV>
<DIV>Can anyone help me ?&nbsp; I am desperate to finally figure this out once 
and for all.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks,</DIV>
<DIV>&nbsp;</DIV>
<DIV>James Anderson.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></FONT></DIV></DIV></DIV></FONT></DIV></FONT></DIV></FONT></DIV></BODY></HTML>