org.geotoolkit.referencing.operation
Class CachingCoordinateOperationFactory
Object
Factory
ReferencingFactory
AbstractCoordinateOperationFactory
CachingCoordinateOperationFactory
- All Implemented Interfaces:
- ObjectFactory, CoordinateOperationFactory, Factory
@Buffered
@ThreadSafe
@Decorator(value=org.opengis.referencing.operation.CoordinateOperationFactory.class)
public class CachingCoordinateOperationFactory
- extends AbstractCoordinateOperationFactory
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 lot 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 CachingCoordinateOperationFactory should be automatically registered and returned
by FactoryFinder in default Geotk configuration.
- Since:
- 2.3
- Version:
- 3.00
- Author:
- Simone Giannecchini (Geosolutions), Martin Desruisseaux (IRD)
- Module:
| Methods inherited from class AbstractCoordinateOperationFactory |
concatenate, concatenate, createConcatenatedOperation, createDefiningConversion, createFromAffineTransform, createFromMathTransform, createFromMathTransform, createFromParameters, getErrorMessage, getImplementationHints, getMathTransformFactory, inverse, swapAndScaleAxis |
CachingCoordinateOperationFactory
public CachingCoordinateOperationFactory()
- Creates a buffered factory wrapping the default one.
CachingCoordinateOperationFactory
public CachingCoordinateOperationFactory(Hints hints)
- Creates a buffered factory wrapping an other factory selected according the specified hints.
- Parameters:
hints - The hints to use for choosing a backing factory.
createOperation
public 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 factory specified at
construction time and the result is cached.
- Parameters:
sourceCRS - Input coordinate reference system.targetCRS - Output coordinate reference system.
- Returns:
- A coordinate operation from
sourceCRS to targetCRS.
- Throws:
OperationNotFoundException - if no operation path was found from sourceCRS
to targetCRS.
FactoryException - if the operation creation failed for some other reason.
createOperation
public 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. If an operation was already created and still in the
cache, the cached operation is returned. Otherwise the operation creation is delegated
to the factory specified at construction time and the result is cached.
- Parameters:
sourceCRS - Input coordinate reference system.targetCRS - Output coordinate reference system.method - The algorithmic method for conversion or transformation.
- Returns:
- A coordinate operation from
sourceCRS to targetCRS.
- Throws:
OperationNotFoundException - if no operation path was found from sourceCRS
to targetCRS.
FactoryException - if the operation creation failed for some other reason.
Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.