Chris van Lith,
I had the same problem recently. I used a "Point in Polygon" algorithm
from "Mastering Algorithms with Perl", Jon Orwant, Jarkko Hietaniemi and
John Macdonald, 1999, O'Reilly, page 443-445. The authors give a good
overview of the problem with an example in perl code that can easily be
translated into Java or C. I implemented a method for OMPoly objects and
don't mind sharing but I extended OMPoly into a very specific class for
my use and the method gets a little complicated because of the domain I
am using it in. I believe the reference explains things better than my
code ever could and also warns of specific side effects of the
algorithm.
hope this helps, phil
chrisvanlith@b3partners.nl wrote:
>
>
> Hello,
>
> I am looking for an algorithm to check if a certain point is within a
> closed polygon or not. I have searched the Openmap classes, but have
> not
> found anything that looks like that. Have I missed it?
>
> It does not seem easy to me, as the polygon can be any shape
> (basically
> following esri´s rules). Does anyone have a hint for me?
>
> Thanks,
> Chris van Lith
>
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT