| org.geotools.referencing.operation.AbstractCoordinateOperationFactory org.geotools.referencing.operation.DefaultCoordinateOperationFactory
All known Subclasses: org.geotools.referencing.operation.AuthorityBackedFactory,
DefaultCoordinateOperationFactory | public class DefaultCoordinateOperationFactory extends AbstractCoordinateOperationFactory (Code) | | Creates
. This factory is capable to find
coordinate
or
between two
. It delegates
most of its work to one or many of
createOperationStep methods. Subclasses can
override those methods in order to extend the factory capability to some more CRS.
since: 2.1 version: $Id: DefaultCoordinateOperationFactory.java 25755 2007-06-06 11:14:58Z desruisseaux $ author: Martin Desruisseaux |
Field Summary | |
final static int | PRIORITY The priority level for this factory. |
Method Summary | |
protected CoordinateOperation | createFromDatabase(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) If the coordinate operation is explicitly defined in some database (typically EPSG),
returns it. | public CoordinateOperation | createOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) Returns an operation for conversion or transformation between two coordinate reference
systems. | public CoordinateOperation | createOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, OperationMethod method) Returns an operation using a particular method for conversion or transformation
between two coordinate reference systems.
If the operation exists on the implementation, then it is returned.
If the operation does not exist on the implementation, then the implementation has the option
of inferring the operation from the argument objects.
If for whatever reason the specified operation will not be returned, then the exception is
thrown.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. Parameters: method - the algorithmic method for conversion or transformation throws: OperationNotFoundException - if no operation path was found from sourceCRS to targetCRS . throws: FactoryException - if the operation creation failed for some other reason. | protected CoordinateOperation | createOperationStep(TemporalCRS sourceCRS, TemporalCRS targetCRS) Creates an operation between two temporal coordinate reference systems.
The default implementation checks if both CRS use the same datum, and
then adjusts for axis direction, units and epoch.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. | protected CoordinateOperation | createOperationStep(VerticalCRS sourceCRS, VerticalCRS targetCRS) Creates an operation between two vertical coordinate reference systems.
The default implementation checks if both CRS use the same datum, and
then adjusts for axis direction and units.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. | protected CoordinateOperation | createOperationStep(GeographicCRS sourceCRS, VerticalCRS targetCRS) Creates an operation between a geographic and a vertical coordinate reference systems.
The default implementation accepts the conversion only if the geographic CRS is a tri
dimensional one and the vertical CRS is for
. | protected CoordinateOperation | createOperationStep(GeographicCRS sourceCRS, GeographicCRS targetCRS) Creates an operation between two geographic coordinate reference systems. | protected CoordinateOperation | createOperationStep(ProjectedCRS sourceCRS, ProjectedCRS targetCRS) Creates an operation between two projected coordinate reference systems.
The default implementation can adjust axis order and orientation. | protected CoordinateOperation | createOperationStep(GeographicCRS sourceCRS, ProjectedCRS targetCRS) Creates an operation from a geographic to a projected coordinate reference system.
The default implementation constructs the following operation chain:
sourceCRS →
→ targetCRS
where the conversion from
baseCRS to
targetCRS is obtained
from targetCRS.
.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. | protected CoordinateOperation | createOperationStep(ProjectedCRS sourceCRS, GeographicCRS targetCRS) Creates an operation from a projected to a geographic coordinate reference system.
The default implementation constructs the following operation chain:
sourceCRS →
→ targetCRS
where the conversion from
sourceCRS to
baseCRS is obtained
from the inverse of
sourceCRS.
.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. | protected CoordinateOperation | createOperationStep(GeocentricCRS sourceCRS, GeocentricCRS targetCRS) Creates an operation between two geocentric coordinate reference systems.
The default implementation can adjust for axis order and orientation,
performs units conversion and apply Bursa Wolf transformation if needed.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. | protected CoordinateOperation | createOperationStep(GeographicCRS sourceCRS, GeocentricCRS targetCRS) Creates an operation from a geographic to a geocentric coordinate reference systems.
If the source CRS doesn't have a vertical axis, height above the ellipsoid will be
assumed equals to zero everywhere. | protected CoordinateOperation | createOperationStep(GeocentricCRS sourceCRS, GeographicCRS targetCRS) Creates an operation from a geocentric to a geographic coordinate reference systems.
The default implementation use the "Geocentric_To_Ellipsoid" math transform.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. | protected CoordinateOperation | createOperationStep(CompoundCRS sourceCRS, SingleCRS targetCRS) Creates an operation from a compound to a single coordinate reference systems.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. | protected CoordinateOperation | createOperationStep(SingleCRS sourceCRS, CompoundCRS targetCRS) Creates an operation from a single to a compound coordinate reference system.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. | protected CoordinateOperation | createOperationStep(CompoundCRS sourceCRS, CompoundCRS targetCRS) Creates an operation between two compound coordinate reference systems.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. |
PRIORITY | final static int PRIORITY(Code) | | The priority level for this factory.
|
DefaultCoordinateOperationFactory | public DefaultCoordinateOperationFactory()(Code) | | Constructs a coordinate operation factory using the default factories.
|
createFromDatabase | protected CoordinateOperation createFromDatabase(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS)(Code) | | If 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 from
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
(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
from/to
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.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS if and only ifone is explicitly defined in some underlying database, or null otherwise. since: 2.3 |
createOperation | public CoordinateOperation createOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) throws OperationNotFoundException, FactoryException(Code) | | Returns an operation for conversion or transformation between two coordinate reference
systems. If an operation exists, it is returned. If more than one operation exists, the
default is returned. If no operation exists, then the exception is thrown.
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.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: OperationNotFoundException - if no operation path was found from sourceCRS to targetCRS . throws: FactoryException - if the operation creation failed for some other reason. |
createOperation | public CoordinateOperation createOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, OperationMethod method) throws OperationNotFoundException, FactoryException(Code) | | Returns an operation using a particular method for conversion or transformation
between two coordinate reference systems.
If the operation exists on the implementation, then it is returned.
If the operation does not exist on the implementation, then the implementation has the option
of inferring the operation from the argument objects.
If for whatever reason the specified operation will not be returned, then the exception is
thrown.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. Parameters: method - the algorithmic method for conversion or transformation throws: OperationNotFoundException - if no operation path was found from sourceCRS to targetCRS . throws: FactoryException - if the operation creation failed for some other reason. method |
createOperationStep | protected CoordinateOperation createOperationStep(TemporalCRS sourceCRS, TemporalCRS targetCRS) throws FactoryException(Code) | | Creates an operation between two temporal coordinate reference systems.
The default implementation checks if both CRS use the same datum, and
then adjusts for axis direction, units and epoch.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: FactoryException - If the operation can't be constructed. |
createOperationStep | protected CoordinateOperation createOperationStep(VerticalCRS sourceCRS, VerticalCRS targetCRS) throws FactoryException(Code) | | Creates an operation between two vertical coordinate reference systems.
The default implementation checks if both CRS use the same datum, and
then adjusts for axis direction and units.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: FactoryException - If the operation can't be constructed. |
createOperationStep | protected CoordinateOperation createOperationStep(GeographicCRS sourceCRS, VerticalCRS targetCRS) throws FactoryException(Code) | | Creates an operation between a geographic and a vertical coordinate reference systems.
The default implementation accepts the conversion only if the geographic CRS is a tri
dimensional one and the vertical CRS is for
. More elaborated operation, like transformation from
ellipsoidal to geoidal height, should be implemented here.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: FactoryException - If the operation can't be constructed. |
createOperationStep | protected CoordinateOperation createOperationStep(GeographicCRS sourceCRS, GeographicCRS targetCRS) throws FactoryException(Code) | | Creates an operation between two geographic coordinate reference systems. The default
implementation can adjust axis order and orientation (e.g. transforming from
(NORTH,WEST) to
(EAST,NORTH) ), performs units conversion
and apply datum shifts if needed.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: FactoryException - If the operation can't be constructed. |
createOperationStep | protected CoordinateOperation createOperationStep(ProjectedCRS sourceCRS, ProjectedCRS targetCRS) throws FactoryException(Code) | | Creates an operation between two projected coordinate reference systems.
The default implementation can adjust axis order and orientation. It also
performs units conversion if it is the only extra change needed. Otherwise,
it performs three steps:
- Unproject from
sourceCRS to its base
.
- Convert the source to target base geographic CRS.
- Project from the base
to the
targetCRS .
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: FactoryException - If the operation can't be constructed. |
createOperationStep | protected CoordinateOperation createOperationStep(GeographicCRS sourceCRS, ProjectedCRS targetCRS) throws FactoryException(Code) | | Creates an operation from a geographic to a projected coordinate reference system.
The default implementation constructs the following operation chain:
sourceCRS →
→ targetCRS
where the conversion from
baseCRS to
targetCRS is obtained
from targetCRS.
.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: FactoryException - If the operation can't be constructed. |
createOperationStep | protected CoordinateOperation createOperationStep(ProjectedCRS sourceCRS, GeographicCRS targetCRS) throws FactoryException(Code) | | Creates an operation from a projected to a geographic coordinate reference system.
The default implementation constructs the following operation chain:
sourceCRS →
→ targetCRS
where the conversion from
sourceCRS to
baseCRS is obtained
from the inverse of
sourceCRS.
.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: FactoryException - If the operation can't be constructed. |
createOperationStep | protected CoordinateOperation createOperationStep(GeocentricCRS sourceCRS, GeocentricCRS targetCRS) throws FactoryException(Code) | | Creates an operation between two geocentric coordinate reference systems.
The default implementation can adjust for axis order and orientation,
performs units conversion and apply Bursa Wolf transformation if needed.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: FactoryException - If the operation can't be constructed. |
createOperationStep | protected CoordinateOperation createOperationStep(GeographicCRS sourceCRS, GeocentricCRS targetCRS) throws FactoryException(Code) | | Creates an operation from a geographic to a geocentric coordinate reference systems.
If the source CRS doesn't have a vertical axis, height above the ellipsoid will be
assumed equals to zero everywhere. The default implementation uses the
"Ellipsoid_To_Geocentric" math transform.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: FactoryException - If the operation can't be constructed. |
createOperationStep | protected CoordinateOperation createOperationStep(GeocentricCRS sourceCRS, GeographicCRS targetCRS) throws FactoryException(Code) | | Creates an operation from a geocentric to a geographic coordinate reference systems.
The default implementation use the "Geocentric_To_Ellipsoid" math transform.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: FactoryException - If the operation can't be constructed. |
createOperationStep | protected CoordinateOperation createOperationStep(CompoundCRS sourceCRS, SingleCRS targetCRS) throws FactoryException(Code) | | Creates an operation from a compound to a single coordinate reference systems.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: FactoryException - If the operation can't be constructed. sourceCRS sourceCRS |
createOperationStep | protected CoordinateOperation createOperationStep(SingleCRS sourceCRS, CompoundCRS targetCRS) throws FactoryException(Code) | | Creates an operation from a single to a compound coordinate reference system.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: FactoryException - If the operation can't be constructed. |
createOperationStep | protected CoordinateOperation createOperationStep(CompoundCRS sourceCRS, CompoundCRS targetCRS) throws FactoryException(Code) | | Creates an operation between two compound coordinate reference systems.
Parameters: sourceCRS - Input coordinate reference system. Parameters: targetCRS - Output coordinate reference system. A coordinate operation from sourceCRS to targetCRS . throws: FactoryException - If the operation can't be constructed. |
Fields inherited from org.geotools.referencing.operation.AbstractCoordinateOperationFactory | final protected static ReferenceIdentifier AXIS_CHANGES(Code)(Java Doc) final protected static ReferenceIdentifier DATUM_SHIFT(Code)(Java Doc) final protected static ReferenceIdentifier ELLIPSOID_SHIFT(Code)(Java Doc) final protected static ReferenceIdentifier GEOCENTRIC_CONVERSION(Code)(Java Doc) final protected static ReferenceIdentifier IDENTITY(Code)(Java Doc) final protected static ReferenceIdentifier INVERSE_OPERATION(Code)(Java Doc)
|
Methods inherited from org.geotools.referencing.operation.AbstractCoordinateOperationFactory | protected CoordinateOperation concatenate(CoordinateOperation step1, CoordinateOperation step2) throws FactoryException(Code)(Java Doc) protected CoordinateOperation concatenate(CoordinateOperation step1, CoordinateOperation step2, CoordinateOperation step3) throws FactoryException(Code)(Java Doc) public CoordinateOperation createConcatenatedOperation(Map properties, CoordinateOperation[] operations) throws FactoryException(Code)(Java Doc) public Conversion createDefiningConversion(Map properties, OperationMethod method, ParameterValueGroup parameters) throws FactoryException(Code)(Java Doc) protected CoordinateOperation createFromAffineTransform(ReferenceIdentifier name, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, Matrix matrix) throws FactoryException(Code)(Java Doc) protected CoordinateOperation createFromMathTransform(ReferenceIdentifier name, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform) throws FactoryException(Code)(Java Doc) protected CoordinateOperation createFromMathTransform(Map properties, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform, OperationMethod method, Class type) throws FactoryException(Code)(Java Doc) protected CoordinateOperation createFromParameters(ReferenceIdentifier name, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, ParameterValueGroup parameters) throws FactoryException(Code)(Java Doc) protected static void ensureNonNull(String name, Object object) throws IllegalArgumentException(Code)(Java Doc) static boolean equalsIgnoreMetadata(IdentifiedObject object1, IdentifiedObject object2)(Code)(Java Doc) static int getDimension(CoordinateReferenceSystem crs)(Code)(Java Doc) protected static String getErrorMessage(IdentifiedObject source, IdentifiedObject target)(Code)(Java Doc) final FactoryGroup getFactoryGroup()(Code)(Java Doc) public Map getImplementationHints()(Code)(Java Doc) final public MathTransformFactory getMathTransformFactory()(Code)(Java Doc) static Map getTemporaryName(IdentifiedObject source)(Code)(Java Doc) static Map getTemporaryName(CoordinateReferenceSystem source, CoordinateReferenceSystem target)(Code)(Java Doc) void initializeHints()(Code)(Java Doc) protected CoordinateOperation inverse(CoordinateOperation operation) throws NoninvertibleTransformException, FactoryException(Code)(Java Doc) protected Matrix swapAndScaleAxis(CoordinateSystem sourceCS, CoordinateSystem targetCS) throws OperationNotFoundException(Code)(Java Doc)
|
|
|