Class ManyCoordinateOperationFactory
- Object
-
- AbstractFactory
-
- ReferencingFactory
-
- AbstractCoordinateOperationFactory
-
- DefaultCoordinateOperationFactory
-
- ManyCoordinateOperationFactory
-
- All Implemented Interfaces:
Factory,ObjectFactory,CoordinateOperationFactory,Factory,RegistrableFactory
public class ManyCoordinateOperationFactory extends DefaultCoordinateOperationFactory
A CoordinateOperationFactory that delegates to multiple underlying factories, returning the first set of results it finds from any of them.
-
-
Field Summary
-
Fields inherited from class DefaultCoordinateOperationFactory
PIVOT_CRS_LIST_KEY
-
Fields inherited from class AbstractCoordinateOperationFactory
AXIS_CHANGES, DATUM_SHIFT, ELLIPSOID_SHIFT, GEOCENTRIC_CONVERSION, IDENTITY, INVERSE_OPERATION
-
Fields inherited from class ReferencingFactory
LOGGER
-
Fields inherited from class AbstractFactory
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
-
-
Constructor Summary
Constructors Constructor Description ManyCoordinateOperationFactory(Hints hints)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CoordinateOperationcreateFromDatabase(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS)If the coordinate operation is explicitly defined in some database (typically EPSG), returns it.Set<CoordinateOperation>findFromDatabase(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, int limit)Returns a list of available coordinate operations explicitly defined in some database (typically EPSG), for the provided CRS pair.-
Methods inherited from class DefaultCoordinateOperationFactory
createOperation, createOperation, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, findOperations, findOperations, findOperationSteps, findOperationSteps, findOperationSteps, findOperationSteps, findOperationSteps, findOperationSteps, tryWellKnownPivots
-
Methods inherited from class AbstractCoordinateOperationFactory
concatenate, concatenate, concatenate, concatenate, createConcatenatedOperation, createDefiningConversion, createFromAffineTransform, createFromMathTransform, createFromMathTransform, createFromParameters, ensureNonNull, getErrorMessage, getImplementationHints, getMathTransformFactory, inverse, swapAndScaleAxis
-
Methods inherited from class ReferencingFactory
getVendor
-
Methods inherited from class AbstractFactory
addImplementationHints, equals, getPriority, hashCode, onDeregistration, onRegistration, toString
-
-
-
-
Constructor Detail
-
ManyCoordinateOperationFactory
public ManyCoordinateOperationFactory(Hints hints)
-
-
Method Detail
-
createFromDatabase
protected CoordinateOperation createFromDatabase(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS)
Description copied from class:DefaultCoordinateOperationFactoryIf the coordinate operation is explicitly defined in some database (typically EPSG), returns it. Otherwise (if there is no database, or if the database doesn't contains an explicit operation fromsourceCRStotargetCRS, or if this method failed to create an operation from the database), returnsnull.The default implementation always returns
null, since there is no database connected to aDefaultCoordinateOperationFactoryinstance. In other words, the default implementation is "standalone": it tries to figure out transformation paths by itself. Subclasses should override this method if they can fetch a more accurate operation from some database. The mean subclass doing so isAuthorityBackedFactory.This method is invoked by
createOperation(sourceCRS, targetCRS)before to try to figure out a transformation path by itself. It is also invoked by variouscreateOperationStep(...)methods when an intermediate CRS was obtained byGeneralDerivedCRS.getBaseCRS()(this case occurs especially during geographic from/to projected CRS operations). This method is not invoked for synthetic CRS generated bycreateOperationStep(...), since those temporary CRS are not expected to exist in a database.- Overrides:
createFromDatabasein classDefaultCoordinateOperationFactory- Parameters:
sourceCRS- Input coordinate reference system.targetCRS- Output coordinate reference system.- Returns:
- A coordinate operation from
sourceCRStotargetCRSif and only if one is explicitly defined in some underlying database, ornullotherwise.
-
findFromDatabase
public Set<CoordinateOperation> findFromDatabase(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, int limit)
Description copied from class:DefaultCoordinateOperationFactoryReturns 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 fromsourceCRStotargetCRS, or if this method failed to create the operations from the database), returns an emptySet.The default implementation always returns an empty
Set, since there is no database connected to aDefaultCoordinateOperationFactoryinstance. In other words, the default implementation is "standalone": it tries to figure out transformation paths by itself. Subclasses should override this method if they can fetch a more accurate operation from some database. The mean subclass doing so isAuthorityBackedFactory.This method is invoked by
findOperations(sourceCRS, targetCRS)before to try to figure out a transformation path by itself. It is also invoked by variousfindOperationSteps(...)methods when an intermediate CRS was obtained byGeneralDerivedCRS.getBaseCRS()(this case occurs especially during geographic from/to projected CRS operations). This method is not invoked for synthetic CRS generated bycreateOperationStep(...), since those temporary CRS are not expected to exist in a database.- Specified by:
findFromDatabasein interfaceCoordinateOperationFactory- Overrides:
findFromDatabasein classDefaultCoordinateOperationFactory- 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 operations. Currently, the behavior for other values oflimitis undefined.- Returns:
- A set of coordinate operations from
sourceCRStotargetCRSif and only if one is explicitly defined in some underlying database, or an emptySetotherwise.
-
-