Package org.opengis.referencing

Examples of org.opengis.referencing.FactoryException


        //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")));

        //any other one should make the map producer fail
        try{
            forceRenderingError(new RuntimeException("fake runtime exception"));
            fail("Expected WMSException");
View Full Code Here


        final Unit< ? > unit = getUnit(unitName);
        final Map<String, String> map = Collections.singletonMap("name", axisName);
        try {
            return FACTORY_CONTAINER.getCSFactory().createCoordinateSystemAxis(map, axisName, direction, unit);
        } catch (FactoryException e) {
            throw new FactoryException(e.getLocalizedMessage());
        }
    }
View Full Code Here

            return NonSI.DAY;
        } else {
            try {
                return (Unit< ? >) UNIT_FORMAT.parseObject(unitName);
            } catch (ParseException e) {
                throw new FactoryException("Unit not known : " + unitName, e);
            }
        }
    }
View Full Code Here

            final EarthGravitationalModel mt = new EarthGravitationalModel(nmax, true);
            final String filename = "EGM180.nor";
            try {
                mt.load(filename);
            } catch (IOException e) {
                throw new FactoryException(Errors.format(ErrorKeys.CANT_READ_$1, filename), e);
            }
            return mt;
        }
View Full Code Here

    public static javax.sql.DataSource createDataSource(Hints hints ) throws FactoryException {
        try {
            return createDataSource(getDirectory());
        } catch (SQLException e) {
            throw new FactoryException( e );
        }
    }
View Full Code Here

        try {
            return renderCoverage(gridCoverage, symbolizer,
                    GridCoverageRendererUtilities.colorToArray(background));
        } catch (Exception e) {
            throw new FactoryException(e);
        } finally {
            this.hints = oldHints;
        }
    }
View Full Code Here

        /*
         * TODO: Implement other cases here (3D-GeographicCRS, etc.).
         *       It may requires the creation of new CoordinateSystem objects,
         *       which is why this method live in ReferencingFactoryContainer.
         */
        throw new FactoryException(Errors.format(ErrorKeys.CANT_SEPARATE_CRS_$1,
                                   crs.getName().getCode()));
    }
View Full Code Here

                        codes = worker.getAuthorityCodes(type);
                        cache.put(type, codes);
                    } catch (FactoryException e) {
                        throw e;
                    } catch (Exception e) {
                        throw new FactoryException(e);
                    } finally {
                        try {
                            getPool().returnObject(worker);
                        } catch (Exception e) {
                            LOGGER.log(Level.WARNING, "Unable to return worker " + e, e);
View Full Code Here

                        obj = worker.createDerivedCRS(code);
                        cache.put(key, obj);
                    } catch (FactoryException e) {
                        throw e;
                    } catch (Exception e) {
                        throw new FactoryException(e);
                    } finally {
                        try {
                            getPool().returnObject(worker);
                        } catch (Exception e) {
                            LOGGER.log(Level.WARNING, "Unable to return worker " + e, e);
View Full Code Here

                        crs = worker.createCompoundCRS(code);
                        cache.put(key, crs);
                    } catch (FactoryException e) {
                        throw e;
                    } catch (Exception e) {
                        throw new FactoryException(e);
                    } finally {
                        try {
                            getPool().returnObject(worker);
                        } catch (Exception e) {
                            LOGGER.log(Level.WARNING, "Unable to return worker " + e, e);
View Full Code Here

TOP

Related Classes of org.opengis.referencing.FactoryException

Copyright © 2018 www.massapicom. 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.