public class AuthorityBackedFactory extends DefaultCoordinateOperationFactory implements OptionalFactory
When createOperation(sourceCRS, targetCRS)
is
invoked, AuthorityBackedFactory
fetch the authority codes for source and target CRS and
submits them to the underlying authority factory through a call
to its
createFromCoordinateReferenceSystemCodes(sourceCode, targetCode)
method. If the authority
factory doesn't know about the specified CRS, then the default (standalone) process from the
super-class is used as a fallback.
AXIS_CHANGES, DATUM_SHIFT, ELLIPSOID_SHIFT, GEOCENTRIC_CONVERSION, IDENTITY, INVERSE_OPERATION
LOGGER
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
Constructor and Description |
---|
AuthorityBackedFactory()
Creates a new factory backed by a default EPSG authority factory.
|
AuthorityBackedFactory(Hints userHints)
Creates a new factory backed by an authority factory fetched using the specified hints.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
accept(CoordinateOperation operation)
Returns
true if the specified operation is acceptable. |
protected CoordinateOperation |
createFromDatabase(CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS)
Returns an operation for conversion or transformation between two coordinate reference
systems.
|
protected Set<CoordinateOperation> |
findFromDatabase(CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS,
int limit)
Returns the list of available operations for conversion or transformation between two
coordinate reference systems.
|
protected CoordinateOperationAuthorityFactory |
getAuthorityFactory()
Returns the underlying coordinate operation authority factory.
|
boolean |
isAvailable()
Returns
true if this factory and its underlying authority factory are available for use. |
protected CoordinateOperation |
validateCandidate(CoordinateOperation candidate,
CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS,
boolean inverse)
Selects a valid operation from a set of candidates.
|
createOperation, createOperation, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, createOperationStep, findOperations, findOperations, findOperationSteps, findOperationSteps, findOperationSteps, findOperationSteps, findOperationSteps, findOperationSteps
concatenate, concatenate, concatenate, concatenate, createConcatenatedOperation, createDefiningConversion, createFromAffineTransform, createFromMathTransform, createFromMathTransform, createFromParameters, ensureNonNull, getErrorMessage, getImplementationHints, getMathTransformFactory, inverse, swapAndScaleAxis
getVendor
addImplementationHints, equals, getPriority, hashCode, onDeregistration, onRegistration, toString
getImplementationHints
public AuthorityBackedFactory()
public AuthorityBackedFactory(Hints userHints)
CRS
, CS
, DATUM
and MATH_TRANSFORM
FACTORY
hints.userHints
- The hints, or null
if none.protected CoordinateOperationAuthorityFactory getAuthorityFactory()
protected CoordinateOperation createFromDatabase(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS)
sourceCRS
and targetCRS
, and submit them to the
createFromCoordinateReferenceSystemCodes(sourceCode, targetCode)
methods. If no
operation is found for those codes, then this method returns null
.
Note that this method may be invoked recursively. For example no operation may be available from the underlying authority factory between two compound CRS, but an operation may be available between two components of those compound CRS.
createFromDatabase
in class DefaultCoordinateOperationFactory
sourceCRS
- Input coordinate reference system.targetCRS
- Output coordinate reference system.sourceCRS
to targetCRS
, or null
if no such operation is explicitly defined in the underlying database.protected CoordinateOperation validateCandidate(CoordinateOperation candidate, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, boolean inverse)
operations
- A set of candidate operationssourceCRS
- Source CRStargetCRS
- Target CRSinverse
- whether the inverse operation has to be appliedprotected Set<CoordinateOperation> findFromDatabase(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, int limit)
sourceCRS
and targetCRS
, and submit them to the
createFromCoordinateReferenceSystemCodes(sourceCode, targetCode)
methods. If no
operation is found for those codes, then this method returns an empty Set
.
Note that this method may be invoked recursively. For example no operation may be available from the underlying authority factory between two compound CRS, but an operation may be available between two components of those compound CRS.
findFromDatabase
in class DefaultCoordinateOperationFactory
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.sourceCRS
to targetCRS
, or an
empty Set
if no operation is explicitly defined in the underlying database for
that CRS pair.protected boolean accept(CoordinateOperation operation)
true
if the specified operation is acceptable. This method is invoked
automatically by createFromDatabase(...)
for
every operation candidates found. The default implementation returns always true
.
Subclasses should override this method if they wish to filter the coordinate operations to be
returned.public boolean isAvailable()
true
if this factory and its underlying authority factory are available for use.isAvailable
in interface OptionalFactory
Copyright © 1996–2019 Geotools. All rights reserved.