Class BufferedCoordinateOperationFactory
Object
AbstractFactory
ReferencingFactory
AbstractCoordinateOperationFactory
BufferedCoordinateOperationFactory
- All Implemented Interfaces:
- Factory,- ObjectFactory,- CoordinateOperationFactory,- BufferedFactory,- Factory,- RegistrableFactory
public class BufferedCoordinateOperationFactory
extends AbstractCoordinateOperationFactory
implements BufferedFactory
Caches the coordinate operations created by an other factory. Those coordinate
 operations may be expensive to create. During rendering and during data I/O, some implementations make use a lof of
 coordinate transformations, hence caching them might help.
 
In most cases, users should not need to create an instance of this class explicitly. An instance of
 BufferedCoordinateOperationFactory should be automatically registered and returned by
 ReferencingFactoryFinder in default Geotools configuration.
- Since:
- 2.3
- Author:
- Simone Giannecchini, Martin Desruisseaux
- 
Field SummaryFields inherited from class AbstractCoordinateOperationFactoryAXIS_CHANGES, DATUM_SHIFT, ELLIPSOID_SHIFT, GEOCENTRIC_CONVERSION, IDENTITY, INVERSE_OPERATIONFields inherited from class ReferencingFactoryLOGGERFields inherited from class AbstractFactoryhints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a buffered factory wrapping the default one.BufferedCoordinateOperationFactory(CoordinateOperationFactory factory, int priority) Wraps the specified factory.BufferedCoordinateOperationFactory(Hints userHints) Creates a buffered factory wrapping an other factory selected according the specified hints.BufferedCoordinateOperationFactory(Hints userHints, int priority) Creates a buffered factory wrapping an other factory selected according the specified hints.
- 
Method SummaryModifier and TypeMethodDescriptioncreateOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) Returns an operation for conversion or transformation between two coordinate reference systems.createOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, OperationMethod method) Returns an operation for conversion or transformation between two coordinate reference systems using the specified method.findOperations(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) Returns all available operations for conversion or transformation between two coordinate reference systems.Methods inherited from class AbstractCoordinateOperationFactoryconcatenate, concatenate, concatenate, concatenate, createConcatenatedOperation, createDefiningConversion, createFromAffineTransform, createFromMathTransform, createFromMathTransform, createFromParameters, ensureNonNull, getErrorMessage, getImplementationHints, getMathTransformFactory, inverse, swapAndScaleAxisMethods inherited from class ReferencingFactorygetVendorMethods inherited from class AbstractFactoryaddImplementationHints, equals, getPriority, hashCode, onDeregistration, onRegistration, toStringMethods inherited from interface FactorygetImplementationHints
- 
Constructor Details- 
BufferedCoordinateOperationFactorypublic BufferedCoordinateOperationFactory()Creates a buffered factory wrapping the default one.
- 
BufferedCoordinateOperationFactoryCreates a buffered factory wrapping an other factory selected according the specified hints.- Parameters:
- userHints- The hints to use for choosing a backing factory.
 
- 
BufferedCoordinateOperationFactoryCreates 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_PRIORITYand- MAXIMUM_PRIORITYinclusive.
 
- 
BufferedCoordinateOperationFactoryWraps the specified factory.- Parameters:
- factory- The factory to wrap.
- priority- The priority for this factory, as a number between- MINIMUM_PRIORITYand- MAXIMUM_PRIORITYinclusive.
 
 
- 
- 
Method Details- 
createOperationpublic CoordinateOperation createOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) throws OperationNotFoundException, FactoryException Returns an operation for conversion or transformation between two coordinate reference systems. If an operation was already created and still in the cache, the cached operation is returned. Otherwise the operation creation is delegated to the coordinate operation factory specified at construction time and the result is cached.- Specified by:
- createOperationin interface- CoordinateOperationFactory
- Parameters:
- sourceCRS- Input coordinate reference system.
- targetCRS- Output coordinate reference system.
- Returns:
- A coordinate operation from sourceCRStotargetCRS.
- Throws:
- OperationNotFoundException- if no operation path was found from- sourceCRSto- targetCRS.
- FactoryException- if the operation creation failed for some other reason.
 
- 
findOperationspublic Set<CoordinateOperation> findOperations(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) throws FactoryException Returns all available operations for conversion or transformation between two coordinate reference systems. The operation creation is delegated to the coordinate operation factory specified at construction time and the result is not cached.- Specified by:
- findOperationsin interface- CoordinateOperationFactory
- Parameters:
- sourceCRS- Input coordinate reference system.
- targetCRS- Output coordinate reference system.
- Returns:
- A Set of coordinate operations from sourceCRStotargetCRS.
- Throws:
- FactoryException- if there was a failure retrieving or creating the operations.
 
- 
createOperationpublic CoordinateOperation createOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, OperationMethod method) throws OperationNotFoundException, FactoryException Returns an operation for conversion or transformation between two coordinate reference systems using the specified method. The current implementation delegates to the coordinate operation factory specified at construction time with no caching.- Specified by:
- createOperationin interface- CoordinateOperationFactory
- Parameters:
- sourceCRS- Input coordinate reference system.
- targetCRS- Output coordinate reference system.
- method- The algorithmic method for conversion or transformation.
- Returns:
- A coordinate operation from sourceCRStotargetCRS.
- Throws:
- OperationNotFoundException- if no operation path was found from- sourceCRSto- targetCRS.
- FactoryException- if the operation creation failed for some other reason.
 
 
-