queryUsingPoint returning incorrect record number??

Sean O'Hagan seano at metavera.com
Tue Sep 12 15:40:55 EDT 2000


Hello yet again   :-)

I thought I'd verify that the set of points returned to me with
queryUsingPoint matched what I obtained visually using ArcExplorer. The
point sets returned by both MapScript and ArcExplorer were:
MScr    ArcE
2797    2798
2799    2800
2801    2802
2802    2803
2803    2804
2804    2805
2806    2807
2807    2808
2809    2810
2811    2824

I thought perhaps there was a pattern, ie. mapscript was returning the
"correct record number minus one". In fact this is what happens when I
restrict the tolerance to only produce one point; instead of the correct
2804, I'm getting 2803. However, the last value of the table on the ArcE
side blows that theory out of the water.

Here's some code snippets:

Part of Map File:
<snip>
LAYER
  NAME mylayer
  TYPE point
  TOLERANCEUNITS meters
  TOLERANCE 100 #this generates one point, set to 1000 generates the ten
points shown above
  STATUS default
  DATA file_name
  CLASS
    SYMBOL 8
    SIZE 8
    COLOR 255 100 0
  END
  QUERY
    TEMPLATE dummy
  END
END
<snip>

My call to qUP:
<snip>
$qryResult = $mapfile->queryUsingPoint($point, 1, -1);
for (my $i=0; $i < $qryResult->{numresults}; $i++) {
    my $shpResult = $qryResult->next();
    $shapesref->[$i] = $shpResult->{shape};
}
<snip>

Metavera Solutions, Inc.
192 Spadina Ave., Suite 405
Toronto, ON
M5T 2C2
Tel: (416) 504-8351
Fax: (416) 364-2636
Email: seano at metavera.com
Fallback email: smohagan at yahoo.com




More information about the mapserver-users mailing list