Hi Chris,
There are a method DrawUtil.inside_polygon that does this.
(com.bbn.openmap.proj.
<file:///D:/openmap/openmap-4.4.2/doc/api/com/bbn/openmap/proj/DrawUtil.html
> DrawUtil ):
I could not really get it to work correctly (dont know why).
So I used java.awt.Polygon.
<http://java.sun.com/j2se/1.3/docs/api/java/awt/Polygon.html#contains(int,
int)> contains(int x, int y)
/David
-----Ursprungligt meddelande-----
Från: chrisvanlith@b3partners.nl [mailto:chrisvanlith@b3partners.nl]
Skickat: den 10 april 2002 08:33
Till: openmap-users@bbn.com
Ämne: find spot within polygon
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"]Received on Wed Apr 10 03:22:21 2002
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT