Hei Jeff, thanks for getting back to me, and so quickly! Haven't been able to 
work on this since I posted hence the slight delay for this. You'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'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'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?

 

Another issue I've found now is that for some reason if you use the expression 
('[BILDEMALES]' <= "5999") 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]' >= '8000') and 
('[bildemales]' <= '9999')) (and many other expressions) instead and it'll 
return the correct number of features for the expression. I even tried 
(('[bildemales]' >= '1') and ('[bildemales]' <= '5999')) and it still returns 
all features instead of just the 73 it should. Is this a bug perhaps? I'm using 
mapserver 5.4.

 

Cheers

 

Tom 

 

________________________________

From: Jeff McKenna [via OSGeo.org] 
[mailto:[email protected]] 
Sent: Wednesday, December 02, 2009 4:23 PM
To: Thomas Ellett
Subject: Re: [mapserver-users] Mapserver Expression Result Error

 

tellett wrote: 


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


Hello, 

Thanks for packaging a test case.  Note that the package is missing font 
  and symbol files that your mapfile points to, so in the future your 
test packages should contain no references to fonts or symbols, to make 
it easier to run (I removed all references and extra metadata and 
objects, to make it easier to read). 

If I open your shapefile in QuantumGIS and do an advanced query for 
'BILDEMALES = 8000' I get 29 records returned. 

If I change your mapfile extents to the full extents of your shapefile, 
and use shp2img to create a map image, those same 29 features are shown 
in the MapServer map image. 

If I use the ogrinfo utility to execute SQL to select 'BILDEMALES = 
8000' values, ogr/gdal returns those same 29 features. 

In other words, I cannot duplicate your problem.  Maybe I don't 
understand what your problem is exactly? 

(using MapServer 5.6.0-rc1) 

-jeff 

-- 
Jeff McKenna 
FOSS4G Consulting and Training Services 
http://www.gatewaygeomatics.com/


_______________________________________________ 
mapserver-users mailing list 
[hidden email] 
<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4100329&i=0>  
http://lists.osgeo.org/mailman/listinfo/mapserver-users



________________________________

View message @ 
http://n2.nabble.com/Mapserver-Expression-Result-Error-tp4100026p4100329.html 
To unsubscribe from Mapserver Expression Result Error, click here < (link 
removed) => . 

 


 
-- 
View this message in context: 
http://n2.nabble.com/Mapserver-Expression-Result-Error-tp4100026p4126817.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to