<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="metricconverter" />
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->

<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->




<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;color:navy'>Hei Jeff, thanks for
getting back to me, and so quickly! Haven&#8217;t been able to work on this
since I posted hence the slight delay for this. You&#8217;re quite right of
course, mapserver is rendering all the correct features, the problem I was
having is to do with getfeatureinfo requests. If you set up a service with the
mapfile and shp file (I&#8217;ve attached a new map file with no reference to
fonts or symbols and less metadata!!) and access in gaia or quantum for
instance (have to use utm32N, 32632), then click around the single polygon that
agrees with the expression you&#8217;ll notice that you still get
getfeatureinfo information, which leads me to understand that the getfeatureinfo
query runs at a layer level rather than a class level and does not inherit any
of the getmap information? Is that right?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;color:navy'>Another issue I&#8217;ve
found now is that for some reason if you use the expression ('[BILDEMALES]' &lt;=
&quot;5999&quot;) in the class, mapserver seems to return all the features, not
just the ones that fit the expression. I queried the shp file in quantum and it
came back with 73 matches. When I create an image using shp2img however (or use
the wms service), mapserver returns all features. Its weird because you can use
the expression (('[bildemales]' &gt;= '8000') and ('[bildemales]' &lt;=
'9999')) (and many other expressions) instead and it&#8217;ll return the
correct number of features for the expression. I even tried (('[bildemales]'
&gt;= '1') and ('[bildemales]' &lt;= '5999')) and it still returns all features
instead of just the 73 it should. Is this a bug perhaps? I&#8217;m using
mapserver 5.4.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;color:navy'>Cheers<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;color:navy'>Tom <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-GB style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2 face=Tahoma><span lang=EN-GB style='font-size:10.0pt;font-family:Tahoma'>
Jeff McKenna [via OSGeo.org] [mailto:<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4126817&i=0" target="_top" rel="nofollow">[hidden email]</a>] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, Dec</span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>ember 02,
2009 4:23 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Thomas Ellett<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [mapserver-users]
Mapserver Expression Result Error</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>tellett wrote: <o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
&gt; Hi all, I've come up against a problem that I just can't seem to fix, so I
<br>
&gt; hope someone on here has the time to look into this and prove that I'm not
<br>
&gt; going crazy!! <br>
&gt; <br>
&gt; I've attached a zip file with a stripped down map file with just one layer
<br>
&gt; and one class and the associated shp file. <br>
&gt; <a href="http://n2.nabble.com/file/n4100026/flydekning.zip" target="_top" rel="nofollow">http://n2.nabble.com/file/n4100026/flydekning.zip</a>&nbsp;flydekning.zip
<br>
&gt; <br>
&gt; The problem is that when I request features with the expression
'BILDEMALES' <br>
&gt; = &quot;8000&quot;, a filter takes place but clearly not the right one
because I just <br>
&gt; seem to get random features returned, some correct, most not (having a <br>
&gt; BILDEMALES value of 1000, 8000, 20000 etc). I originally tried this with <br>
&gt; postgis data and tried regex expressions, string comparisons and logical <br>
&gt; mapserver expressions, and with different values for the attribute. <br>
&gt; Everytime it returned some right and some wrong values. <br>
&gt; <br>
&gt; The attribute column in postgis was originally var char and I converted it
<br>
&gt; to numeric, neither worked. <br>
&gt; <br>
&gt; So now I've tried with the original shp file and get the same results. The
<br>
&gt; attribute in the shp file is of type char. Also, as you can see with the <br>
&gt; commented out time extents, originally (when connecting to postgis) I was <br>
&gt; just calling records from 1947 (filtering on the fotodato attribute which
I <br>
&gt; changed to type date in postgis), but with the shp file I should be
calling <br>
&gt; all records as there is no date filter in place anymore (the fotodato
field <br>
&gt; in the shp file is of type char). However, even though the records
returned <br>
&gt; seem to be random, they are all from 1947. This isn't so important, just a
<br>
&gt; bit weird? I've checked the log file but I seem to just be getting the
error <br>
&gt; message: <br>
&gt; <br>
&gt; 'msSearchDiskTree(): Search returned no results. Unable to open spatial <br>
&gt; index for /opt/maps/flyfoto_dekning/flightpass-1-<st1:metricconverter ProductID="999f" w:st="on">999f</st1:metricconverter>.qix. In most cases you <br>
&gt; can safely ignore this message, otherwise check file names and
permissions.' <br>
&gt; <br>
&gt; The data is in utm32N or epsg:32632 <br>
&gt; <br>
&gt; Hope someones encountered this before and knows the fix!! <br>
&gt; <br>
&gt; <o:p></o:p></span></font></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><br>
Hello, <br>
<br>
Thanks for packaging a test case. &nbsp;Note that the package is missing font <br>
&nbsp; and symbol files that your mapfile points to, so in the future your <br>
test packages should contain no references to fonts or symbols, to make <br>
it easier to run (I removed all references and extra metadata and <br>
objects, to make it easier to read). <br>
<br>
If I open your shapefile in QuantumGIS and do an advanced query for <br>
'BILDEMALES = 8000' I get 29 records returned. <br>
<br>
If I change your mapfile extents to the full extents of your shapefile, <br>
and use shp2img to create a map image, those same 29 features are shown <br>
in the MapServer map image. <br>
<br>
If I use the ogrinfo utility to execute SQL to select 'BILDEMALES = <br>
8000' values, ogr/gdal returns those same 29 features. <br>
<br>
In other words, I cannot duplicate your problem. &nbsp;Maybe I don't <br>
understand what your problem is exactly? <br>
<br>
(using MapServer 5.6.0-rc1) <br>
<br>
-jeff <br>
<br>
-- <br>
Jeff McKenna <br>
FOSS4G Consulting and Training Services <br>
<a href="http://www.gatewaygeomatics.com/" target="_top" rel="nofollow">http://www.gatewaygeomatics.com/</a><br>
<br>
<br>
_______________________________________________ <br>
mapserver-users mailing list <br>
<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=4100329&amp;i=0" target="_top" rel="nofollow">[hidden email]</a> <br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_top" rel="nofollow">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br>
<o:p></o:p></span></font></p>

<div class=MsoNormal align=center style='text-align:center'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=1 width="100%" noshade color="#cccccc" align=center>

</span></font></div>

<div>

<p class=MsoNormal><font size=1 color="#666666" face=Tahoma><span style='font-size:8.5pt;font-family:Tahoma;color:#666666'>View message @ <a href="http://n2.nabble.com/Mapserver-Expression-Result-Error-tp4100026p4100329.html" target="_top" rel="nofollow">http://n2.nabble.com/Mapserver-Expression-Result-Error-tp4100026p4100329.html</a>
<br>
To unsubscribe from Mapserver Expression Result Error, <a target="_top" rel="nofollow">click
here</a>. <o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>




<br /> <div class="small"><br/><img src="http://n2.nabble.com/images/icon_attachment.gif" > <strong>flyfoto_error.zip</strong> (645K) <a href="http://n2.nabble.com/attachment/4126817/0/flyfoto_error.zip" target="_top">Download Attachment</a></div>
<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/Mapserver-Expression-Result-Error-tp4100026p4126817.html">RE: [mapserver-users] Mapserver Expression Result Error</a><br>
Sent from the <a href="http://n2.nabble.com/Mapserver-User-f1969211.html">Mapserver - User mailing list archive</a> at Nabble.com.<br>