I am trying to find a simple library which can do point in polygon. Earlier i did hit Java Spatial Index library ...could not figure out.
Tried openmap..looked simple didn't work.
I am totally new to GIS..my application has polygons. i need to search if my point isin a polygon or new polygon(s)
in open map i wrote as follows.
package abc.poi;
import com.bbn.openmap.geo.Geo;
import com.bbn.openmap.geo.OMGeo;
public class PoiTest {
public static void main(String[] arg) {
Geo geo1 = new Geo(1,1);
Geo geo2 = new Geo(3,2);
Geo geo3 = new Geo(4,4);
Geo geo4 = new Geo(3,4);
Geo geo5 = new Geo(4,3);
Geo geo6 = new Geo(1,1);
Geo listGeo[] = {geo1,geo2,geo3,geo4,geo5,geo6};
OMGeo.Polygon poly = new OMGeo.Polygon(listGeo);
System.out.println(poly.isPointInside(new Geo(2,2)));
}
}
It always returns false. What i am missing ?


