<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hi,
<div><br>
</div>
<div>As far as I know the Filter is used while data retrieving. At least I have with Postgis and a OSM map FILTER like that:</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>FILTER "type IN ('rail', 'monorail', 'lightrail‘)"</div>
<div>This is passed 1:1 to the Postgis data source (I checked that) and thus has a huge performance impact as the complete rest of the map config works on less data.</div>
<div><br>
</div>
<div>Expression is to distinct between the loaded data for the individual CLASSes.</div>
<div><br>
<div>
<div style="color: rgb(0, 0, 0);  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-family: 'Courier New'; margin: 0px; min-height: 11px; ">
<br class="Apple-interchange-newline">
<hr size="2" width="100%" align="center" style="font-family: 'Times New Roman', serif; font-size: 16px; ">
<div><span style="font-size: 13px; font-family: Arial; color: rgb(146, 146, 146); ">Gregor Karzelek</span></div>
</div>
<p style="font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; margin: 1px 0px 5px; color: rgb(146, 146, 146); ">
<font face="Arial" size="1">Systemarchitekt</font><span style="font-family: Arial; font-size: 12px; font-weight: normal; font-style: normal; "> </span></p>
<p style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; margin: 12px 0px 5px; color: rgb(146, 146, 146); ">
<font face="Arial"><span style="font-size: 13px; ">HELLER Ingenieurgesellschaft mbH<br>
Otto-Hesse-Straße 19 / T3<br>
64293 Darmstadt<br>
Tel.: +49 6151 66846-16<br>
Fax: +49 6151 66846-22<br>
E-Mail:<span class="Apple-converted-space"> </span><a href="mailto:gregor.karzelek@heller-ig.com"><span style="color: rgb(4, 51, 255); ">gregor.karzelek@heller-ig.com</span></a><span class="Apple-converted-space"> </span><br>
Internet:<span class="Apple-converted-space"> </span><a href="http://www.heller-ig.com"><span style="color: rgb(4, 51, 255); ">www.heller-ig.com</span></a> </span></font></p>
<p style="font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; margin: 12px 0px 5px; color: rgb(146, 146, 146); ">
<font size="1"><font style="font-family: Arial; font-weight: normal; font-style: normal; ">Geschäftsführer: </font><font face="Arial">Dipl.-Ing. Henning Balck, Dipl.-Ing. Christian Komma</font><font style="font-family: Arial; font-weight: normal; font-style: normal; "><br>
Handelsregister: Amtsgericht Darmstadt HRB 8310<br>
Ust.-Ident.-Nr.: DE 217 293 137 </font></font></p>
<p style=" font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-family: Calibri; margin: 0px; color: rgb(146, 146, 146); ">
<font size="1"> </font></p>
</div>
<br>
<div>
<div>Am 14.05.2014 um 15:05 schrieb Rahkonen Jukka (Tike) <<a href="mailto:jukka.rahkonen@mmmtike.fi">jukka.rahkonen@mmmtike.fi</a>>:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
Hi,<br>
<br>
Thank you very much, Christy. By your example I made some tests and now filters like this work for me<br>
FILTER (([WORKERS]>20000000) OR ("[STATE_FIPS]"="17"))<br>
<br>
The secret element was the right syntax for string attributes  ("[STATE_FIPS]"="17").<br>
Now when I know how it must be used I can find corresponding examples from the expression page of Mapserver documentation. Could someone explain shortly what is the difference between filter and expression? To me they seem to do pretty similar work.<br>
<br>
-Jukka Rahkonen-<br>
<br>
Christy Nieman wrote:<br>
<br>
<blockquote type="cite">You do not need to set both FILTERITEM and FILTER.  You can just set FILTER to<br>
an expression using as many attributes as you need. e.g.<br>
FILTER (( [POPULATION] < 500000 ) AND ("[DISPLAY]" == "1")). Just like you can<br>
have multiple attributes in a class EXPRESSION.<br>
<br>
I think it's the section of the document that is key - the "MapServer Expressions"<br>
section talks about using FILTER and EXPRESSION in more complex logical<br>
expressions, where as the section you quoted is talking about basic string<br>
comparison.<br>
<br>
Christy<br>
<br>
On 14/05/14 08:03 AM, Rahkonen Jukka (Tike) wrote:<br>
<blockquote type="cite">Hi,<br>
<br>
>From document page: <a href="http://mapserver.org/mapfile/expressions.html">http://mapserver.org/mapfile/expressions.html</a><br>
"To use a string comparison for filtering a LAYER, both FILTERITEM and FILTER<br>
</blockquote>
must be set. FILTERITEM is set to the attribute name. FILTER is set to the value<br>
for comparison. The same rule applies to CLASSITEM in the LAYER object and<br>
EXPRESSION in the CLASS object."<br>
<blockquote type="cite"><br>
That would mean that only one attribute from the data can be used for<br>
</blockquote>
building a filter. Is this true or just old information living in the document?<br>
<blockquote type="cite"><br>
-Jukka Rahkonen-<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
</blockquote>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
</blockquote>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></div>
</blockquote>
</div>
<br>
</div>
</body>
</html>