public class DefaultCoordinateOperationFactory extends AbstractCoordinateOperationFactory
createOperationStep
methods. Subclasses can override
those methods in order to extend the factory capability to some more CRS.AXIS_CHANGES, DATUM_SHIFT, ELLIPSOID_SHIFT, GEOCENTRIC_CONVERSION, IDENTITY, INVERSE_OPERATION
LOGGER
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
Constructor and Description 

DefaultCoordinateOperationFactory()
Constructs a coordinate operation factory using the default factories.

DefaultCoordinateOperationFactory(Hints userHints)
Constructs a coordinate operation factory using the specified hints.

DefaultCoordinateOperationFactory(Hints userHints,
int priority)
Constructs a coordinate operation factory using the specified hints and priority.

Modifier and Type  Method and Description 

protected CoordinateOperation 
createFromDatabase(CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS)
If the coordinate operation is explicitly defined in some database (typically EPSG), returns
it.

CoordinateOperation 
createOperation(CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS)
Returns an operation for conversion or transformation between two coordinate reference
systems.

CoordinateOperation 
createOperation(CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS,
OperationMethod method)
Returns an operation using a particular method for conversion or transformation between two
coordinate reference systems.

protected CoordinateOperation 
createOperationStep(CompoundCRS sourceCRS,
CompoundCRS targetCRS)
Creates an operation between two compound coordinate reference systems.

protected CoordinateOperation 
createOperationStep(CompoundCRS sourceCRS,
SingleCRS targetCRS)
Creates an operation from a compound to a single coordinate reference systems.

protected CoordinateOperation 
createOperationStep(GeocentricCRS sourceCRS,
GeocentricCRS targetCRS)
Creates an operation between two geocentric coordinate reference systems.

protected CoordinateOperation 
createOperationStep(GeocentricCRS sourceCRS,
GeographicCRS targetCRS)
Creates an operation from a geocentric to a geographic coordinate reference systems.

protected CoordinateOperation 
createOperationStep(GeographicCRS sourceCRS,
GeocentricCRS targetCRS)
Creates an operation from a geographic to a geocentric coordinate reference systems.

protected CoordinateOperation 
createOperationStep(GeographicCRS sourceCRS,
GeographicCRS targetCRS)
Creates an operation between two geographic coordinate reference systems.

protected CoordinateOperation 
createOperationStep(GeographicCRS sourceCRS,
ProjectedCRS targetCRS)
Creates an operation from a geographic to a projected coordinate reference system.

protected CoordinateOperation 
createOperationStep(GeographicCRS sourceCRS,
VerticalCRS targetCRS)
Creates an operation between a geographic and a vertical coordinate reference systems.

protected CoordinateOperation 
createOperationStep(ProjectedCRS sourceCRS,
GeographicCRS targetCRS)
Creates an operation from a projected to a geographic coordinate reference system.

protected CoordinateOperation 
createOperationStep(ProjectedCRS sourceCRS,
ProjectedCRS targetCRS)
Creates an operation between two projected coordinate reference systems.

protected CoordinateOperation 
createOperationStep(SingleCRS sourceCRS,
CompoundCRS targetCRS)
Creates an operation from a single to a compound coordinate reference system.

protected CoordinateOperation 
createOperationStep(TemporalCRS sourceCRS,
TemporalCRS targetCRS)
Creates an operation between two temporal coordinate reference systems.

protected CoordinateOperation 
createOperationStep(VerticalCRS sourceCRS,
VerticalCRS targetCRS)
Creates an operation between two vertical coordinate reference systems.

protected 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.

Set<CoordinateOperation> 
findOperations(CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS)
Returns all the available operations for conversion or transformation between two coordinate
reference systems.

protected Set<CoordinateOperation> 
findOperations(CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS,
int limit)
Returns all the available operations for conversion or transformation between two coordinate
reference systems.

protected Set<CoordinateOperation> 
findOperationSteps(CompoundCRS sourceCRS,
CompoundCRS targetCRS,
int limit)
Returns all available operations between two compound coordinate reference systems.

protected Set<CoordinateOperation> 
findOperationSteps(CompoundCRS sourceCRS,
SingleCRS targetCRS,
int limit)
Returns all available operations from a compound to a single coordinate reference system.

protected Set<CoordinateOperation> 
findOperationSteps(GeographicCRS sourceCRS,
ProjectedCRS targetCRS,
int limit)
Returns all available operations from a geographic to a projected coordinate reference
system.

protected Set<CoordinateOperation> 
findOperationSteps(ProjectedCRS sourceCRS,
GeographicCRS targetCRS,
int limit)
Returns all available operations from a projected to a geographic coordinate reference
system.

protected Set<CoordinateOperation> 
findOperationSteps(ProjectedCRS sourceCRS,
ProjectedCRS targetCRS,
int limit)
Returns all available operations between two projected coordinate reference systems.

protected Set<CoordinateOperation> 
findOperationSteps(SingleCRS sourceCRS,
CompoundCRS targetCRS,
int limit)
Returns all available operations from a single to a compound coordinate reference system.

concatenate, concatenate, concatenate, concatenate, createConcatenatedOperation, createDefiningConversion, createFromAffineTransform, createFromMathTransform, createFromMathTransform, createFromParameters, ensureNonNull, getErrorMessage, getImplementationHints, getMathTransformFactory, inverse, swapAndScaleAxis
getVendor
addImplementationHints, equals, getPriority, hashCode, onDeregistration, onRegistration, toString
public DefaultCoordinateOperationFactory()
public DefaultCoordinateOperationFactory(Hints userHints)
CRS
, CS
, DATUM
and MATH_TRANSFORM
FACTORY
hints.userHints
 The hints, or null
if none.public DefaultCoordinateOperationFactory(Hints userHints, int priority)
CRS
, CS
, DATUM
and MATH_TRANSFORM
FACTORY
hints.userHints
 The hints, or null
if none.priority
 The priority for this factory, as a number between MINIMUM_PRIORITY
and MAXIMUM_PRIORITY
inclusive.public CoordinateOperation createOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) throws OperationNotFoundException, FactoryException
The default implementation inspects the CRS and delegates the work to one or many createOperationStep(...)
methods. This method fails if no path between the CRS is found.
sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.OperationNotFoundException
 if no operation path was found from sourceCRS
to
targetCRS
.FactoryException
 if the operation creation failed for some other reason.public Set<CoordinateOperation> findOperations(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) throws FactoryException
The default implementation inspects the CRS and delegates the work to one or many createOperationStep(...)
methods. This method fails if no path between the CRSs is found.
sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.Set
of coordinate operations from sourceCRS
to targetCRS
.FactoryException
 if the operation creation failed for some other reason.protected Set<CoordinateOperation> findOperations(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, int limit) throws FactoryException
The default implementation inspects the CRS and delegates the work to one or many createOperationStep(...)
methods. This method fails if no path between the CRSs is found.
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 of limit
is undefined.Set
of coordinate operations from sourceCRS
to targetCRS
.FactoryException
 if the operation creation failed for some other reason.public CoordinateOperation createOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, OperationMethod method) throws OperationNotFoundException, FactoryException
sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.method
 the algorithmic method for conversion or transformationsourceCRS
to targetCRS
.OperationNotFoundException
 if no operation path was found from sourceCRS
to
targetCRS
.FactoryException
 if the operation creation failed for some other reason.protected CoordinateOperation createOperationStep(TemporalCRS sourceCRS, TemporalCRS targetCRS) throws FactoryException
sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected CoordinateOperation createOperationStep(VerticalCRS sourceCRS, VerticalCRS targetCRS) throws FactoryException
sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected CoordinateOperation createOperationStep(GeographicCRS sourceCRS, VerticalCRS targetCRS) throws FactoryException
sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected CoordinateOperation createOperationStep(GeographicCRS sourceCRS, GeographicCRS targetCRS) throws FactoryException
(NORTH,WEST)
to (EAST,NORTH)
), performs units conversion and apply datum shifts if
needed.sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected CoordinateOperation createOperationStep(ProjectedCRS sourceCRS, ProjectedCRS targetCRS) throws FactoryException
sourceCRS
to its base geographic CRS.
targetCRS
.
sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected Set<CoordinateOperation> findOperationSteps(ProjectedCRS sourceCRS, ProjectedCRS targetCRS, int limit) throws FactoryException
sourceCRS
to its base geographic CRS.
targetCRS
.
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.Set
of coordinate operations from sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected CoordinateOperation createOperationStep(GeographicCRS sourceCRS, ProjectedCRS targetCRS) throws FactoryException
where the conversion fromsourceCRS → baseCRS → targetCRS
baseCRS
to targetCRS
is obtained from
targetCRS.getConversionFromBase()
.sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected Set<CoordinateOperation> findOperationSteps(GeographicCRS sourceCRS, ProjectedCRS targetCRS, int limit) throws FactoryException
where the conversion fromsourceCRS → baseCRS → targetCRS
baseCRS
to targetCRS
is obtained from
targetCRS.getConversionFromBase()
.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 of limit
is undefined.Set
of coordinate operations from sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected CoordinateOperation createOperationStep(ProjectedCRS sourceCRS, GeographicCRS targetCRS) throws FactoryException
where the conversion fromsourceCRS → baseCRS → targetCRS
sourceCRS
to baseCRS
is obtained from the inverse
of sourceCRS.getConversionFromBase()
.sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected Set<CoordinateOperation> findOperationSteps(ProjectedCRS sourceCRS, GeographicCRS targetCRS, int limit) throws FactoryException
where the conversion fromsourceCRS → baseCRS → targetCRS
sourceCRS
to baseCRS
is obtained from the inverse
of sourceCRS.getConversionFromBase()
.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 of limit
is undefined.Set
of coordinate operations from sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected CoordinateOperation createOperationStep(GeocentricCRS sourceCRS, GeocentricCRS targetCRS) throws FactoryException
sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected CoordinateOperation createOperationStep(GeographicCRS sourceCRS, GeocentricCRS targetCRS) throws FactoryException
"Ellipsoid_To_Geocentric"
math
transform.sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected CoordinateOperation createOperationStep(GeocentricCRS sourceCRS, GeographicCRS targetCRS) throws FactoryException
"Geocentric_To_Ellipsoid"
math transform.sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected CoordinateOperation createOperationStep(CompoundCRS sourceCRS, SingleCRS targetCRS) throws FactoryException
sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected Set<CoordinateOperation> findOperationSteps(CompoundCRS sourceCRS, SingleCRS targetCRS, int limit) throws FactoryException
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 of limit
is undefined.Set
of coordinate operations from sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected CoordinateOperation createOperationStep(SingleCRS sourceCRS, CompoundCRS targetCRS) throws FactoryException
sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected Set<CoordinateOperation> findOperationSteps(SingleCRS sourceCRS, CompoundCRS targetCRS, int limit) throws FactoryException
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 of limit
is undefined.Set
of coordinate operations from sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected CoordinateOperation createOperationStep(CompoundCRS sourceCRS, CompoundCRS targetCRS) throws FactoryException
sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected Set<CoordinateOperation> findOperationSteps(CompoundCRS sourceCRS, CompoundCRS targetCRS, int limit) throws FactoryException
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 of limit
is undefined.Set
of coordinate operations from sourceCRS
to targetCRS
.FactoryException
 If the operation can't be constructed.protected CoordinateOperation createFromDatabase(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS)
sourceCRS
to targetCRS
, or if this method failed to create an
operation from the database), returns null
.
The default implementation always returns null
, since there is no database
connected to a DefaultCoordinateOperationFactory
instance. 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 is AuthorityBackedFactory
.
This method is invoked by createOperation(sourceCRS,
targetCRS)
before to try to figure out a transformation path by itself. It is also
invoked by various createOperationStep(...)
methods when an intermediate CRS was
obtained by GeneralDerivedCRS.getBaseCRS()
(this case occurs especially during
geographic from/to projected CRS
operations). This method is not invoked for synthetic CRS generated by
createOperationStep(...)
, since those temporary CRS are not expected to exist in a
database.
sourceCRS
 Input coordinate reference system.targetCRS
 Output coordinate reference system.sourceCRS
to targetCRS
if and only if one
is explicitly defined in some underlying database, or null
otherwise.protected Set<CoordinateOperation> findFromDatabase(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, int limit)
sourceCRS
to targetCRS
,
or if this method failed to create the operations from the database), returns an empty Set
.
The default implementation always returns an empty Set
, since there is no database
connected to a DefaultCoordinateOperationFactory
instance. 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 is AuthorityBackedFactory
.
This method is invoked by findOperations(sourceCRS,
targetCRS)
before to try to figure out a transformation path by itself. It is also
invoked by various findOperationSteps(...)
methods when an intermediate CRS was
obtained by GeneralDerivedCRS.getBaseCRS()
(this case occurs especially during
geographic from/to projected CRS
operations). This method is not invoked for synthetic CRS generated by
createOperationStep(...)
, since those temporary CRS are not expected to exist in a
database.
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 of limit
is undefined.sourceCRS
to targetCRS
if and
only if one is explicitly defined in some underlying database, or an empty Set
otherwise.Copyright © 1996–2022 Geotools. All rights reserved.