Here is how I do it:
Shape s = poly.getShape();
Point p = projection.forward(lat, lon);
if(s.contains(p) {
// It's in there
}
Hope this helps,
Brian Hudson
________________________________
From: owner-openmap-users_at_bbn.com [mailto:owner-openmap-users_at_bbn.com] On
Behalf Of Andrew Schulak
Sent: Thursday, March 17, 2005 2:28 PM
To: openmap-users_at_bbn.com
Subject: [OpenMap Users] Determine if a LatLonPoint is inside an OMPoly?
I saw some posts in the archives from 3 years ago on this but I did not see
an answer so I will ask again.
What is the best way to determine if a LatLonPoint is inside an OMPoly?
Thanks much,
Andrew
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Mar 17 2005 - 15:15:03 EST