Examples of NoninvertibleTransformException


Examples of java.awt.geom.NoninvertibleTransformException

        final double m11 = transform.getScaleY();
        final double m01 = transform.getShearX();
        final double m10 = transform.getShearY();
        final double det = m00*m11 - m01*m10;
        if (!(abs(det) > Double.MIN_VALUE)) {
            throw new NoninvertibleTransformException(null);
        }
        final double x0 = vector.getX();
        final double y0 = vector.getY();
        final double x = (x0*m11 - y0*m01) / det;
        final double y = (y0*m00 - x0*m10) / det;
View Full Code Here

Examples of java.awt.geom.NoninvertibleTransformException

    @SuppressWarnings("deprecation")
    public void testRenderingErrorsHandling() throws Exception {

        // the ones that are ignorable by the renderer
        assertNotNull(forceRenderingError(new TransformException("fake transform exception")));
        assertNotNull(forceRenderingError(new NoninvertibleTransformException(
                "fake non invertible exception")));
        assertNotNull(forceRenderingError(new IllegalAttributeException(
                "non illegal attribute exception")));
        assertNotNull(forceRenderingError(new FactoryException("fake factory exception")));
View Full Code Here

Examples of java.awt.geom.NoninvertibleTransformException

            usr2dev = new AffineTransform();
        } else {
            usr2dev = new AffineTransform(usr2dev);
        }
        if (usr2dev.getDeterminant() == 0) {
            throw new NoninvertibleTransformException("");
        }
        this.usr2dev = usr2dev;
    }
View Full Code Here

Examples of java.awt.geom.NoninvertibleTransformException

    @Test
    public void testRenderingErrorsHandling() throws Exception {

        // the ones that are ignorable by the renderer
        assertNotNull(forceRenderingError(new TransformException("fake transform exception")));
        assertNotNull(forceRenderingError(new NoninvertibleTransformException(
                "fake non invertible exception")));
        assertNotNull(forceRenderingError(new IllegalAttributeException(
                "non illegal attribute exception")));
        assertNotNull(forceRenderingError(new FactoryException("fake factory exception")));
View Full Code Here

Examples of org.opengis.referencing.operation.NoninvertibleTransformException

            } else {
                final XMatrix matrix = getGeneralMatrix();
                try {
                    matrix.invert();
                } catch (SingularMatrixException exception) {
                    throw new NoninvertibleTransformException(Errors.format(
                              ErrorKeys.NONINVERTIBLE_TRANSFORM), exception);
                } catch (MismatchedSizeException exception) {
                    // This exception is thrown if the matrix is not square.
                    throw new NoninvertibleTransformException(Errors.format(
                              ErrorKeys.NONINVERTIBLE_TRANSFORM), exception);
                }
                inverse = new ProjectiveTransform(matrix);
                inverse.inverse = this;
            }
View Full Code Here

Examples of org.opengis.referencing.operation.NoninvertibleTransformException

                synchronized (this) {
                    inverse = new AffineTransform2D(createInverse());
                    inverse.inverse = this;
                }
            } catch (java.awt.geom.NoninvertibleTransformException exception) {
                throw new NoninvertibleTransformException(exception.getLocalizedMessage(), exception);
            }
        }
        return inverse;
    }
View Full Code Here

Examples of org.opengis.referencing.operation.NoninvertibleTransformException

     */
    public MathTransform inverse() throws NoninvertibleTransformException {
        if (isIdentity()) {
            return this;
        }
        throw new NoninvertibleTransformException(Errors.format(ErrorKeys.NONINVERTIBLE_TRANSFORM));
    }
View Full Code Here

Examples of org.opengis.referencing.operation.NoninvertibleTransformException

        try {
            final XMatrix m = toXMatrix(matrix);
            m.invert();
            return m;
        } catch (SingularMatrixException exception) {
            NoninvertibleTransformException e = new NoninvertibleTransformException(
                        Errors.format(ErrorKeys.NONINVERTIBLE_TRANSFORM));
            e.initCause(exception);
            throw e;
        }
    }
View Full Code Here

Examples of org.opengis.referencing.operation.NoninvertibleTransformException

     * Returns the inverse of this map projection.
     */
    @Override
    public final MathTransform2D inverse() throws NoninvertibleTransformException {
        if(!invertible) {
            throw new NoninvertibleTransformException(Errors.format(ErrorKeys.NONINVERTIBLE_TRANSFORM));
        }
           
       
        // No synchronization. Not a big deal if this method is invoked in
        // the same time by two threads resulting in two instances created.
View Full Code Here

Examples of pythagoras.util.NoninvertibleTransformException

            // compute average of the matrix with its inverse transpose
            float det = o00*o11 - o10*o01;
            if (Math.abs(det) == 0f) {
                // determinant is zero; matrix is not invertible
                throw new NoninvertibleTransformException(this.toString());
            }
            float hrdet = 0.5f / det;
            n00 = +o11 * hrdet + o00*0.5f;
            n10 = -o01 * hrdet + o10*0.5f;

 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.