/** * Computes the </tt>covers</tt> predicate between a {@link PreparedPolygon} * and a {@link Geometry}. * * @param prep the prepared polygon * @param geom a test geometry * @return true if the polygon covers the geometry */ public static boolean covers(PreparedPolygon prep, Geometry geom) { PreparedPolygonCovers polyInt = new PreparedPolygonCovers(prep); return polyInt.covers(geom); }
/** * Tests whether this PreparedPolygon <tt>covers</tt> a given geometry. * * @param geom the test geometry * @return true if the test geometry is covered */ public boolean covers(Geometry geom) { return eval(geom); }
public boolean covers(Geometry g) { // short-circuit test if (! envelopeCovers(g)) return false; // optimization for rectangle arguments if (isRectangle) { return true; } return PreparedPolygonCovers.covers(this, g); } }