/** * Returns the {@linkplain DatumFactory datum factory} singleton. * * @throws FactoryNotFoundException if no factory was found for the requested type. * @throws FactoryRegistryException if the factory can't be obtained for an other reason. */ public DatumFactory getDatumFactory() throws FactoryRegistryException { return ReferencingFactoryFinder.getDatumFactory(hints); }
/** * Returns the {@linkplain Datum datum} factory. * * @return The Datum factory. */ public DatumFactory getDatumFactory() { if (datumFactory == null) { synchronized (hints) { datumFactory = ReferencingFactoryFinder.getDatumFactory(hints()); } } return datumFactory; }
/** Creates a builder from the specified hints. */ public MathTransformBuilder(final Hints hints) { mtFactory = ReferencingFactoryFinder.getMathTransformFactory(hints); crsFactory = ReferencingFactoryFinder.getCRSFactory(hints); datumFactory = ReferencingFactoryFinder.getDatumFactory(hints); }
/** * Constructs a parser for the specified set of symbols using default factories. * * @param symbols The symbols for parsing and formatting numbers. * @todo Pass hints in argument. */ public Parser(final Symbols symbols) { this( symbols, ReferencingFactoryFinder.getDatumFactory(null), ReferencingFactoryFinder.getCSFactory(null), ReferencingFactoryFinder.getCRSFactory(null), ReferencingFactoryFinder.getMathTransformFactory(null)); }
/** * Creates a new instance of GeoTiffMetadata2CRSAdapter * * @param hints a map of hints to locate the authority and object factories. (can be null) */ public GeoTiffMetadata2CRSAdapter(Hints hints) { this.hints = hints != null ? hints.clone() : GeoTools.getDefaultHints().clone(); // various authority related factories allAuthoritiesFactory = new AllAuthoritiesFactory(this.hints); // various factories datumObjFactory = ReferencingFactoryFinder.getDatumFactory(this.hints); mtFactory = ReferencingFactoryFinder.getMathTransformFactory(this.hints); }
/** * Creates a coordinate reference system object from a string. * * @param wkt Coordinate system encoded in Well-Known Text format. * @throws FactoryException if the object creation failed. */ public synchronized CoordinateReferenceSystem createFromWKT(final String wkt) throws FactoryException { /* * Note: while this factory is thread safe, the WKT parser is not. * Since we share a single instance of this parser, we must synchronize. */ if (parser == null) { createParser(ReferencingFactoryFinder.getDatumFactory(null), getMathTransformFactory()); } try { return parser.parseCoordinateReferenceSystem(wkt); } catch (ParseException exception) { final Throwable cause = exception.getCause(); if (cause instanceof FactoryException) { throw (FactoryException) cause; } throw new FactoryException(exception); } }
final DatumFactory datumFactory = ReferencingFactoryFinder.getDatumFactory(hints); createParser(datumFactory, mtFactory); addHints(datumFactory);
/** * Returns the {@linkplain DatumFactory datum factory} singleton. * * @throws FactoryNotFoundException if no factory was found for the requested type. * @throws FactoryRegistryException if the factory can't be obtained for an other reason. */ public DatumFactory getDatumFactory() throws FactoryRegistryException { return ReferencingFactoryFinder.getDatumFactory(hints); }
/** * Returns the {@linkplain DatumFactory datum factory} singleton. * * @throws FactoryNotFoundException if no factory was found for the requested type. * @throws FactoryRegistryException if the factory can't be obtained for an other reason. */ public DatumFactory getDatumFactory() throws FactoryRegistryException { return ReferencingFactoryFinder.getDatumFactory(hints); }
/** Setup the factories using the hints provided by {@link #getHintsForTesting}. */ @Before public final void setUpFactories() { Hints hints = getHintsForTesting(); datumFactory = ReferencingFactoryFinder.getDatumFactory(hints); crsFactory = ReferencingFactoryFinder.getCRSFactory(hints); mtFactory = ReferencingFactoryFinder.getMathTransformFactory(hints); opFactory = ReferencingFactoryFinder.getCoordinateOperationFactory(hints); }
out.println(); out.println("create Coodinate Reference System....1: "); final DatumFactory datumFactory = ReferencingFactoryFinder.getDatumFactory(null); final CSFactory csFactory = ReferencingFactoryFinder.getCSFactory(null); final CRSFactory crsFactory = ReferencingFactoryFinder.getCRSFactory(null);
break; case 1: factory = ReferencingFactoryFinder.getDatumFactory(null); break; case 2:
/** * Creates a new instance of GeoTiffMetadata2CRSAdapter * * @param hints * a map of hints to locate the authority and object factories. * (can be null) */ public GeoTiffMetadata2CRSAdapter(Hints hints) { final Hints tempHints = hints != null ? new Hints(hints) : DEFAULT_HINTS; this.hints = (Hints) tempHints.clone(); allAuthoritiesFactory = hints != null ? new AllAuthoritiesFactory(this.hints): DEFAULT_ALLAUTHORITIES_FACTORY; // factory = new ThreadedEpsgFactory(hints); datumObjFactory = ReferencingFactoryFinder.getDatumFactory(this.hints); crsFactory = ReferencingFactoryFinder.getCRSFactory(this.hints); csFactory = ReferencingFactoryFinder.getCSFactory(this.hints); tempHints.put(Hints.DATUM_AUTHORITY_FACTORY, allAuthoritiesFactory); tempHints.put(Hints.CS_FACTORY, csFactory); tempHints.put(Hints.CRS_FACTORY, crsFactory); tempHints.put(Hints.MATH_TRANSFORM_FACTORY, mtFactory); factories = ReferencingFactoryContainer.instance(tempHints); }
final CSFactory csFactory = ReferencingFactoryFinder.getCSFactory(hints); final CRSFactory crsFactory = ReferencingFactoryFinder.getCRSFactory(hints); final DatumFactory datumFactory = ReferencingFactoryFinder.getDatumFactory(hints); final MathTransformFactory mtFactory = ReferencingFactoryFinder.getMathTransformFactory(hints);