@Test public void testPointInPolygon() { Polygon p = createPolygon(); FastPointInPolygon pip = new FastPointInPolygon(p); GeometryFactory gf = new GeometryFactory(); assertEquals(pip.test(gf.createPoint(new Coordinate(-0.5,0))), true); assertEquals(pip.test(gf.createPoint(new Coordinate(0.5,0))), false); assertEquals(pip.test(gf.createPoint(new Coordinate(1.5,0))), false); }
@Override public boolean test(Point point) { return crossingNumber(point, true) % 2 == 1; }
FastPointInPolygon extends FastInPolygon implements Predicate<Point> { @Override public boolean test(Point point) { return crossingNumber(point, true) % 2 == 1; } }
FastPointInPolygon extends FastInPolygon implements Predicate<Point> { @Override public boolean test(Point point) { return crossingNumber(point, true) % 2 == 1; } <P extends Geometry & Polygonal> FastPointInPolygon(P geom); }
FastPointInPolygon extends FastInPolygon implements Predicate<Point> { @Override public boolean test(Point point) { return crossingNumber(point, true) % 2 == 1; } <P extends Geometry & Polygonal> FastPointInPolygon(P geom); @Override boolean test(Point point); }
FastPointInPolygon extends FastInPolygon implements Predicate<Point> { @Override public boolean test(Point point) { return crossingNumber(point, true) % 2 == 1; } <P extends Geometry & Polygonal> FastPointInPolygon(P geom); @Override boolean test(Point point);  }