[Mapserver-users] OT: Point in Poly
Lowell Filak
lfilak at medinaco.org
Fri Mar 7 13:24:20 PST 2003
In theory:
You could use Mapscript functions:
queryByPoint to grab the ID of the poly the point 'is' inside of and
compare that to the ID of the poly you are testing against to tell you
if it's inside.
Then distanceToShape for how far outside.
And possibly use distanceToLine for each of the lines that make up the
shape to see how far/close inside.
HTH
Lowell F.
The following message was sent by "Lowther, David W" <dlowther at ou.edu> on Fri, 7 Mar 2003 14:29:37 -0600.
> Hi List,
>
> I am looking for point in poly code. Specifically, I would like to pass a
> point, and a poly to a routine and return whether the point is inside or
> outside the polygon and how far from the polygon the point is. If its in,
> then how far inside, if its out, then how far outside.
>
> Can anyone point me in the right direction to locate the pieces of this?
>
> Thanks,
>
> David Lowther
> Software Engineer
> GEO Information Systems
> University of Oklahoma
> dlowther at ou.edu
> (405) 325-3131
> http://www.geo.ou.edu <http://www.geo.ou.edu>
>
>
>
>
More information about the MapServer-users
mailing list