class ReferencedEnvelope extends Envelope implements org.opengis.geometry.Envelope,
    BoundingBox {

    public boolean boundsEquals2D(final org.opengis.geometry.Envelope other, double eps) {
        eps *= 0.5*(getWidth() + getHeight());

        double[] delta = new double[4];
        delta[0] = getMinimum(0) - other.getMinimum(0);
        delta[1] = getMaximum(0) - other.getMaximum(0);
        delta[2] = getMinimum(1) - other.getMinimum(1);
        delta[3] = getMaximum(1) - other.getMaximum(1);

        for (int i = 0; i < delta.length; i++) {
            /*
             * As per Envelope2D#boundsEquals we use ! here to
             * catch any NaN values
             */
            if (!(Math.abs(delta[i]) <= eps)) {
                return false;
            }
        }
        return true;
    }

    public  ReferencedEnvelope();
    public  ReferencedEnvelope(CoordinateReferenceSystem crs);
    public  ReferencedEnvelope(final double x1, final double x2, final double y1, final double y2,
        final CoordinateReferenceSystem crs);
    public  ReferencedEnvelope(final Rectangle2D rectangle, final CoordinateReferenceSystem crs);
    public  ReferencedEnvelope(final ReferencedEnvelope envelope);
    public  ReferencedEnvelope(final BoundingBox bbox);
    public  ReferencedEnvelope(final org.opengis.geometry.Envelope envelope);
    public  ReferencedEnvelope(final Envelope envelope, final CoordinateReferenceSystem crs);

}