/** * Tests if the given point lies in or on the envelope. * * @param p the point which this <code>Envelope</code> is being checked for containing * @return <code>true</code> if the point lies in the interior or on the boundary of this <code> * Envelope</code>. */ public boolean covers(Coordinate p) { return covers(p.x, p.y, p.z); }
/** * Tests if the given point lies in or on the envelope. * * <p>Note that this is <b>not</b> the same definition as the SFS <tt>contains</tt>, which would * exclude the envelope boundary. * * @param p the point which this <code>Envelope</code> is being checked for containing * @return <code>true</code> if the point lies in the interior or on the boundary of this <code> * Envelope</code>. * @see #covers(Coordinate) */ public boolean contains(Coordinate p) { return covers(p); }
/** * Tests if the given point lies in or on the envelope. * * <p>Note that this is <b>not</b> the same definition as the SFS <tt>contains</tt>, which would * exclude the envelope boundary. * * @param x the x-coordinate of the point which this <code>Envelope</code> is being checked for * containing * @param y the y-coordinate of the point which this <code>Envelope</code> is being checked for * containing * @return <code>true</code> if <code>(x, y)</code> lies in the interior or on the boundary of * this <code>Envelope</code>. * @see #covers(double, double) */ public boolean contains(double x, double y, double z) { return covers(x, y, z); }
/** * Tests if the given point lies in or on the envelope. * * @param x the x-coordinate of the point which this <code>Envelope</code> is being checked for * containing * @param y the y-coordinate of the point which this <code>Envelope</code> is being checked for * containing * @return <code>true</code> if <code>(x, y)</code> lies in the interior or on the boundary of * this <code>Envelope</code>. */ public boolean covers(double x, double y, double z) { if (isNull()) return false; return covers(x, y) && z >= minz && z <= maxz; }
/** Returns {@code true} if the provided bounds are contained by this bounding box. */ public boolean contains(final BoundingBox3D bbox) { ensureCompatibleReferenceSystem(bbox); return covers(getJTSEnvelope(bbox)); }