[OpenMap Users] OMPoly and getShape woes

From: Lepkowski, Thomas M., CTR, OSD-PA&E <Thomas.Lepkowski.ctr_at_osd.mil>
Date: Mon, 19 Dec 2005 17:25:00 -0500

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

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT