Classification: UNCLASSIFIED
Hello all,
I have two things:
1) a valid and displayed OMGraphic with LatLonPoint (of course).
2) a valid and displayed OMPoly ( in the form of ESRIPolygon ).
The OMGraphic point is inside the OMPoly. It's like a town inside a state.
The state is represented by the OMPoly and the town is a simple OMGraphic.
I want to show programmatically that the town is inside the state.
My following code is not printing "true":
<CODE>
// some code bringing me here
// OMPoly is on map
EsriPolygon ep = (EsriPolygon) omg;
ep.setDoShapes( true );
ep.generate( projection );
GeneralPath gp = ep.getShape();
// latLonPoint is inside the polygon
// THIS PRINTS "false" EXPECT IT TO PRINT "true"
System.out.println( "Inside polygon: " + gp.contains(
latLonPoint.getLongitude(), latLonPoint.getLatitude() );
</CODE>
I expect gp.contains( ) wants another representation of x,y but I don't know
what.
Any help is greatly appreciated.
-Tom
--
[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 Mon Dec 19 2005 - 17:52:21 EST