<!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> </DIV>
<DIV><FONT face=Arial size=2>Hi all,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have a great problem. </FONT></DIV>
<DIV><FONT face=Arial size=2>I have a shape file layer of some roads. All
the different road types are in the same shape file, and Attibute data is used
to specify the road type. I have a attribute/column named TYPE. The
data here ... eg road types are Paved,Unpaved, Dirt Road, etc</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Now what I want is to filter out the road types I
dont want. 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. I see lots of others having problems with this. Reading posts
here I see lots of conflicting info. 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. I have tired
things like</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </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.
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> </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> </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> </DIV>
<DIV>FILTERITEM "TYPE"</DIV>
<DIV>FILTER "Paved"</DIV>
<DIV> </DIV>
<DIV>This works in that it shows only paved roads. Yet the moment I try
and get it to work on more than one roadtype, it freaks out and shows
nothing. I tried doing similar things with the Expression parameter but
also with no results.</DIV>
<DIV> </DIV>
<DIV>My Layer looks like this:</DIV>
<DIV> </DIV>
<DIV><BR>LAYER<BR> NAME
"tr_ro_final"<BR> TYPE
line<BR> CONNECTIONTYPE
OGR<BR> CONNECTION
"/maps/tr_ro_final.shp"<BR> STATUS
DEFAULT<BR> #FILTER "[TYPE] eq
'Unpaved'"<BR> #FILTERITEM
"TYPE"<BR><BR> #FILTER '!"Dirt
Road"'<BR> #MINSCALE
3.01<BR> #MAXSCALE
99.01<BR>
CLASS<BR>
#Expression ([TYPE] eq "Unpaved")<BR>
#COLOR 151 75 0<BR>
COLOR 255 0
0<BR>
SYMBOL
"circle"<BR>
SIZE 3<BR> END<BR>END<BR></DIV>
<DIV>As you can see I have still left in some of the things I was playing
with. Still .. I have not got far. I have not been able to find any
proper documentation of using mapserver regex or using the filter parameter
properly. </DIV>
<DIV> </DIV>
<DIV>My mapserver version:</DIV>
<DIV> </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 ? I am desperate to finally figure this out once
and for all.</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV> </DIV>
<DIV>James Anderson.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV></FONT></DIV></DIV></DIV></FONT></DIV></FONT></DIV></FONT></DIV></BODY></HTML>