Re: [OpenMap Users] Is OpenMap the right tool for my project?

From: Redd Murphy <beauchampmj.ctr_at_Npt.NUWC.Navy.Mil>
Date: Wed, 23 May 2007 08:19:05 -0700 (PDT)

Don,

Thank you very much for your help. I apologize if I'm a little slow on this,
but I am still having trouble getting this to work. I have tried to isolate
the portion of the code that deals with projection and contains() like this:

float[] f = {141, 17, 148, 17, 148, 10, 141, 10, 141, 17};
OMPoly omp = new OMPoly(f, OMGraphic.DECIMAL_DEGREES,
OMGraphic.LINETYPE_STRAIGHT);
LatLonPoint pt = new LatLonPoint(145, 12);
Mercator merc = new Mercator(new LatLonPoint(0f,0f), 100000000f,600,600);
omp.generate(merc);
Point loc = merc.forward(pt);
Shape s = omp.getShape();

System.out.println("s.contains(loc):"+s.contains(loc));

In this case I'm trying to create a polygon with 4 points between 141 and
148 East, and 10 and 17 North. This should contain the lat/lon 145, 12.
But the shape.contains() still returns false. Can you see what I'm doing
wrong?

Thanks again for your help.

Redd

-- 
View this message in context: http://www.nabble.com/Is-OpenMap-the-right-tool-for-my-project--tf3779655.html#a10766078
Sent from the OpenMap mailing list archive at Nabble.com.
--
[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 Wed May 23 2007 - 11:20:01 EDT

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