queryByPoint() php/mapscript help?

Gavin Simpson gavin.simpson at UCL.AC.UK
Fri Apr 15 14:37:49 EDT 2005


Camden Daily wrote:
> Gavin,
>
> The only thing I can immediately notice is that it does not appear
> that you are creating your point layer correctly.  You create a point,
> create a line, and then add the point to the line.  Then you create a
> shape and add it to the layer, but it does not appear that you ever
> add the line to the shape.  Try adding this code after you create your
> shape and line:
> $shape->add($line);
>
> If things still don't work, you might try testing out queryByPoint()
> against a point layer defined in a shapefile.  That way, you could at
> least determine whether the issue is with how your create the point
> layer or how you query it.
>
> -Camden Daily
>
>

Arrrrrggggghhhhhh!!!! I can't believe I missed that. I've even been
taking my colleague through the code and explaining in plain english
what each statement did (to see if we could find the error) and it never
occurred to me I'd forgotten to add the line to the shape.

I can't even blame too little coffee...

Thanks for looking through the code and the fix, and thanks also for the
fixed php_mapscript.c you submitted.

All the best

Gav

--
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [T] +44 (0)20 7679 5522
ENSIS Research Fellow             [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC                 [E] gavin.simpsonATNOSPAMucl.ac.uk
UCL Department of Geography       [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way                    [W] http://www.ucl.ac.uk/~ucfagls/
London.  WC1H 0AP.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the mapserver-users mailing list