[mapserver-users] mapscript queryByPoint - tolerance depends of resolution ?

Oliver Christen oliver.christen at camptocamp.com
Wed Jul 9 05:41:37 PDT 2008


Hi

I have a problem when doing a queryByPoint with phpmapscript 4.10.1

By default, the resolution of my map is 96 dpi.
I do a queryByPoint on a layer containing polygonal areas. The point is 
right in the middle of one area.
I use a default tolerance (-1) corresponding, if I read correctly the 
documentation, to 3 pixels.

The result obtained is the area containing the coordinates I used, it's 
absolutly normal and I get what I expect.

Now, if I dynamicaly change the resolution of the map to 150 dpi and then do 
exactly the same queryByPoint as before,
I get nothing!
Mapserver consider there was nothing at the coordinate I provided.

Then, if I redo the query, at 150 dpi, BUT with a tolerance set to 10 
(instead of -1), I get a correct and expected result.

So, somehow, Mapserver seems to make some very weird calculation with the 
tolerance and resolution which make it to believe there is nothing when then 
is something.

have you ever heard of such behaviour?
is that a bug?

any help would be very welcome.

thanks in advance
Oliver 




More information about the MapServer-users mailing list