@Test public void testPointInPolygonWithHole() { Polygon p = createPolygonWithHole(); FastPointInPolygon pip = new FastPointInPolygon(p); GeometryFactory gf = new GeometryFactory(); assertEquals(pip.test(gf.createPoint(new Coordinate(2.25,0))), true); assertEquals(pip.test(gf.createPoint(new Coordinate(3,0))), false); assertEquals(pip.test(gf.createPoint(new Coordinate(4.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);  }