queryByPoint tolerance problems

Pēteris Brūns peteris.bruns at GMAIL.COM
Thu Dec 14 09:37:00 EST 2006


Hi,

I have some php-mapscript based webpage, that uses layer->queryByPoint.
In map file I have set
Tolerance 10
Toleranceunits pixels

When I issue query using layer->queryByPoint with buffer==0, according 
to docs
"Passing buffer <=0 defaults to tolerances set in the map file  (in
pixels) but you can use a constant buffer (specified in ground units)
instead." 
(http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class/classes/layerobj) 

it should find only objects within 10 pix.
In reality it was returning more distant objects than 10px. When I was
zoomed-in (had not default extent from mapfile), it returned results
also for 50px and more distant objects.

My Question: Is it a bug in MapServer 4.10.0 or bug in documentation?

I have already fixed my problem by calculating pixel size with PHP and
then passing search buffer size in ground units, but I still want to
know what I did wrong in first place. (Yes, I checked
$layer->tolerance and $layer->toleranceuinits and they where correct)



More information about the mapserver-users mailing list