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 BufferedCoordinateOperationFactoryshould be automatically registered and returned byReferencingFactoryFinderin default Geotools configuration.- Since:
- 2.3
- Author:
- Simone Giannecchini, Martin Desruisseaux
 
- 
- 
Field Summary- 
Fields inherited from class AbstractCoordinateOperationFactoryAXIS_CHANGES, DATUM_SHIFT, ELLIPSOID_SHIFT, GEOCENTRIC_CONVERSION, IDENTITY, INVERSE_OPERATION
 - 
Fields inherited from class ReferencingFactoryLOGGER
 - 
Fields inherited from class AbstractFactoryhints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
 
- 
 - 
Constructor SummaryConstructors Constructor Description BufferedCoordinateOperationFactory()Creates 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 SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description CoordinateOperationcreateOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS)Returns an operation for conversion or transformation between two coordinate reference systems.CoordinateOperationcreateOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, OperationMethod method)Returns an operation for conversion or transformation between two coordinate reference systems using the specified method.Set<CoordinateOperation>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, swapAndScaleAxis
 - 
Methods inherited from class ReferencingFactorygetVendor
 - 
Methods inherited from class AbstractFactoryaddImplementationHints, equals, getPriority, hashCode, onDeregistration, onRegistration, toString
 - 
Methods inherited from interface FactorygetImplementationHints
 
- 
 
- 
- 
- 
Constructor Detail- 
BufferedCoordinateOperationFactorypublic BufferedCoordinateOperationFactory() Creates a buffered factory wrapping the default one.
 - 
BufferedCoordinateOperationFactorypublic 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.
 
 - 
BufferedCoordinateOperationFactorypublic 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_PRIORITYand- MAXIMUM_PRIORITYinclusive.
 
 - 
BufferedCoordinateOperationFactorypublic 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_PRIORITYand- MAXIMUM_PRIORITYinclusive.
 
 
- 
 - 
Method Detail- 
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.
 
 
- 
 
-