Class BufferedCoordinateOperationFactory

    • Constructor Detail

      • BufferedCoordinateOperationFactory

        public BufferedCoordinateOperationFactory()
        Creates a buffered factory wrapping the default one.
      • BufferedCoordinateOperationFactory

        public BufferedCoordinateOperationFactory​(Hints userHints)
        Creates a buffered factory wrapping an other factory selected according the specified hints.
        Parameters:
        userHints - The hints to use for choosing a backing factory.
      • BufferedCoordinateOperationFactory

        public BufferedCoordinateOperationFactory​(ManyCoordinateOperationFactory many,
                                                  Hints hints)
        Creates a buffered factory wrapping the specified factory.
      • BufferedCoordinateOperationFactory

        public BufferedCoordinateOperationFactory​(Hints userHints,
                                                  int priority)
        Creates a buffered factory wrapping an other factory selected according the specified hints.
        Parameters:
        userHints - The hints to use for choosing a backing factory.
        priority - The priority for this factory, as a number between MINIMUM_PRIORITY and MAXIMUM_PRIORITY inclusive.
      • BufferedCoordinateOperationFactory

        public BufferedCoordinateOperationFactory​(CoordinateOperationFactory factory,
                                                  int priority)
        Wraps the specified factory.
        Parameters:
        factory - The factory to wrap.
        priority - The priority for this factory, as a number between MINIMUM_PRIORITY and MAXIMUM_PRIORITY inclusive.
      • BufferedCoordinateOperationFactory

        public BufferedCoordinateOperationFactory​(CoordinateOperationFactory factory,
                                                  Hints userHints,
                                                  int priority)
        Work around for RFE #4093999 in Sun's bug database ("Relax constraint on placement of this()/super() call in constructors").
    • Method Detail

      • getBackingFactory

        public final CoordinateOperationFactory getBackingFactory()
        Returns the backing factory. Coordinate operation creation will be delegated to this factory when not available in the cache.
      • findFromDatabase

        public Set<CoordinateOperation> findFromDatabase​(CoordinateReferenceSystem sourceCRS,
                                                         CoordinateReferenceSystem targetCRS,
                                                         int limit)
        Description copied from interface: CoordinateOperationFactory
        Returns a list of available coordinate operations explicitly defined in some database (typically EPSG), for the provided CRS pair. Otherwise (if there is no database, or if the database doesn't contains any explicit operation from sourceCRS to targetCRS, or if this method failed to create the operations from the database), returns an empty Set.

        The default implementation always returns an empty Set. Subclasses should override this method if they can fetch a more accurate operation from some database.

        This method is normally invoked by findOperations(sourceCRS, targetCRS) before to try to figure out a transformation path by itself.

        The default implementation returns an empty set, subclasses working with an actual transformation database can override

        Specified by:
        findFromDatabase in interface CoordinateOperationFactory
        Parameters:
        sourceCRS - Input coordinate reference system.
        targetCRS - Output coordinate reference system.
        limit - The maximum number of operations to be returned. Use -1 to return all the available operations. Use 1 to return just one operation. Currently, the behavior for other values of limit is undefined.
        Returns:
        A set of coordinate operations from sourceCRS to targetCRS if and only if one is explicitly defined in some underlying database, or an empty Set otherwise.