| org.geotools.referencing.factory.ReferencingFactory org.geotools.referencing.operation.AbstractCoordinateOperationFactory
All known Subclasses: org.geotools.referencing.operation.DefaultCoordinateOperationFactory, org.geotools.referencing.operation.BufferedCoordinateOperationFactory,
AbstractCoordinateOperationFactory | abstract public class AbstractCoordinateOperationFactory extends ReferencingFactory implements CoordinateOperationFactory(Code) | | Base class for coordinate operation factories. This class provides helper methods for the
construction of building blocks. It doesn't figure out any operation path by itself. This
more "intelligent" job is left to subclasses.
since: 2.1 version: $Id: AbstractCoordinateOperationFactory.java 28264 2007-12-05 21:53:08Z desruisseaux $ author: Martin Desruisseaux |
Field Summary | |
final protected static ReferenceIdentifier | AXIS_CHANGES The identifier for conversion using an affine transform for axis swapping and/or
unit conversions. | final protected static ReferenceIdentifier | DATUM_SHIFT The identifier for a transformation which is a datum shift. | final protected static ReferenceIdentifier | ELLIPSOID_SHIFT The identifier for a transformation which is a datum shift without
.
Only the changes in ellipsoid axis-length are taken in account. | final protected static ReferenceIdentifier | GEOCENTRIC_CONVERSION The identifier for a geocentric conversion. | final protected static ReferenceIdentifier | IDENTITY The identifier for an identity operation. | final protected static ReferenceIdentifier | INVERSE_OPERATION The identifier for an inverse operation. |
Method Summary | |
protected CoordinateOperation | concatenate(CoordinateOperation step1, CoordinateOperation step2) Concatenate two operation steps. | protected CoordinateOperation | concatenate(CoordinateOperation step1, CoordinateOperation step2, CoordinateOperation step3) Concatenate three transformation steps. | public CoordinateOperation | createConcatenatedOperation(Map properties, CoordinateOperation[] operations) Creates a concatenated operation from a sequence of operations.
Parameters: properties - Set of properties. | public Conversion | createDefiningConversion(Map properties, OperationMethod method, ParameterValueGroup parameters) Constructs a defining conversion from a set of properties.
Parameters: properties - Set of properties. | protected CoordinateOperation | createFromAffineTransform(ReferenceIdentifier name, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, Matrix matrix) Creates a coordinate operation from a matrix, which usually describes an affine tranform.
A default
OperationMethod object is given to this transform. | protected CoordinateOperation | createFromMathTransform(ReferenceIdentifier name, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform) Creates a coordinate operation from a math transform.
Parameters: name - The identifier for the operation to be created. Parameters: sourceCRS - The source coordinate reference system. Parameters: targetCRS - The destination coordinate reference system. Parameters: transform - The math transform. | protected CoordinateOperation | createFromMathTransform(Map properties, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform, OperationMethod method, Class type) Creates a coordinate operation from a math transform.
If the specified math transform is already a coordinate operation, and if source
and target CRS match, then
transform is returned with no change.
Otherwise, a new coordinate operation is created.
Parameters: properties - The properties to give to the operation. Parameters: sourceCRS - The source coordinate reference system. Parameters: targetCRS - The destination coordinate reference system. Parameters: transform - The math transform. Parameters: method - The operation method, or null . Parameters: type - The required super-class (e.g. | protected CoordinateOperation | createFromParameters(ReferenceIdentifier name, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, ParameterValueGroup parameters) Creates a coordinate operation from a set of parameters.
The
is inferred automatically,
if possible.
Parameters: name - The identifier for the operation to be created. Parameters: sourceCRS - The source coordinate reference system. Parameters: targetCRS - The target coordinate reference system. Parameters: parameters - The parameters. | protected static void | ensureNonNull(String name, Object object) Makes sure an argument is non-null. | static boolean | equalsIgnoreMetadata(IdentifiedObject object1, IdentifiedObject object2) Compares the specified objects for equality. | static int | getDimension(CoordinateReferenceSystem crs) Returns the dimension of the specified coordinate system,
or
0 if the coordinate system is null. | protected static String | getErrorMessage(IdentifiedObject source, IdentifiedObject target) Returns an error message for "No path found from sourceCRS to targetCRS".
This is used for the construction of
OperationNotFoundException .
Parameters: source - The source CRS. Parameters: target - The target CRS. | final FactoryGroup | getFactoryGroup() Returns the set of helper methods on factories. | public Map | getImplementationHints() Returns the implementation hints for this factory. | final public MathTransformFactory | getMathTransformFactory() Returns the underlying math transform factory. | static Map | getTemporaryName(IdentifiedObject source) Returns a temporary name for object derived from the specified one. | static Map | getTemporaryName(CoordinateReferenceSystem source, CoordinateReferenceSystem target) Returns a temporary name for object derived from a concatenation. | void | initializeHints() Invoked when the
AbstractCoordinateOperationFactory.hints map should be initialized. | protected CoordinateOperation | inverse(CoordinateOperation operation) Returns the inverse of the specified operation.
Parameters: operation - The operation to invert. | protected Matrix | swapAndScaleAxis(CoordinateSystem sourceCS, CoordinateSystem targetCS) Returns an affine transform between two coordinate systems. |
AXIS_CHANGES | final protected static ReferenceIdentifier AXIS_CHANGES(Code) | | The identifier for conversion using an affine transform for axis swapping and/or
unit conversions.
|
ELLIPSOID_SHIFT | final protected static ReferenceIdentifier ELLIPSOID_SHIFT(Code) | | The identifier for a transformation which is a datum shift without
.
Only the changes in ellipsoid axis-length are taken in account. Such ellipsoid shifts
are approximative and may have 1 kilometer error. This transformation is allowed
only if the factory was created with
Hints.LENIENT_DATUM_SHIFT set to
Boolean.TRUE .
See Also: PositionalAccuracyImpl.DATUM_SHIFT_OMITTED |
GEOCENTRIC_CONVERSION | final protected static ReferenceIdentifier GEOCENTRIC_CONVERSION(Code) | | The identifier for a geocentric conversion.
|
IDENTITY | final protected static ReferenceIdentifier IDENTITY(Code) | | The identifier for an identity operation.
|
INVERSE_OPERATION | final protected static ReferenceIdentifier INVERSE_OPERATION(Code) | | The identifier for an inverse operation.
|
AbstractCoordinateOperationFactory | AbstractCoordinateOperationFactory(CoordinateOperationFactory factory, Hints hints, int priority)(Code) | | If the specified factory is an instance of
AbstractCoordinateOperationFactory ,
fetch the
FactoryGroup from this instance instead of from the hints. This
constructor is strictly reserved for factory subclasses that are wrapper around an
other factory, like
BufferedCoordinateOperationFactory .
|
concatenate | protected CoordinateOperation concatenate(CoordinateOperation step1, CoordinateOperation step2) throws FactoryException(Code) | | Concatenate two operation steps. If an operation is an
AbstractCoordinateOperationFactory.AXIS_CHANGES ,
it will be included as part of the second operation instead of creating an
ConcatenatedOperation . If a concatenated operation is created, it
will get an automatically generated name.
Parameters: step1 - The first step, or null for the identity operation. Parameters: step2 - The second step, or null for the identity operation. A concatenated operation, or null if all arguments was nul. throws: FactoryException - if the operation can't be constructed. |
concatenate | protected CoordinateOperation concatenate(CoordinateOperation step1, CoordinateOperation step2, CoordinateOperation step3) throws FactoryException(Code) | | Concatenate three transformation steps. If the first and/or the last operation is an
AbstractCoordinateOperationFactory.AXIS_CHANGES , it will be included as part of the second operation instead of
creating an
ConcatenatedOperation . If a concatenated operation is created, it
will get an automatically generated name.
Parameters: step1 - The first step, or null for the identity operation. Parameters: step2 - The second step, or null for the identity operation. Parameters: step3 - The third step, or null for the identity operation. A concatenated operation, or null if all arguments were null. throws: FactoryException - if the operation can't be constructed. |
createConcatenatedOperation | public CoordinateOperation createConcatenatedOperation(Map properties, CoordinateOperation[] operations) throws FactoryException(Code) | | Creates a concatenated operation from a sequence of operations.
Parameters: properties - Set of properties. Should contains at least "name" . Parameters: operations - The sequence of operations. The concatenated operation. throws: FactoryException - if the object creation failed. |
createDefiningConversion | public Conversion createDefiningConversion(Map properties, OperationMethod method, ParameterValueGroup parameters) throws FactoryException(Code) | | Constructs a defining conversion from a set of properties.
Parameters: properties - Set of properties. Should contains at least "name" . Parameters: method - The operation method. Parameters: parameters - The parameter values. The defining conversion. throws: FactoryException - if the object creation failed. See Also: DefiningConversion since: 2.4 |
createFromAffineTransform | protected CoordinateOperation createFromAffineTransform(ReferenceIdentifier name, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, Matrix matrix) throws FactoryException(Code) | | Creates a coordinate operation from a matrix, which usually describes an affine tranform.
A default
OperationMethod object is given to this transform. In the special case
where the
name identifier is
AbstractCoordinateOperationFactory.DATUM_SHIFT or
AbstractCoordinateOperationFactory.ELLIPSOID_SHIFT ,
the operation will be an instance of
Transformation instead of the usual
Conversion .
Parameters: name - The identifier for the operation to be created. Parameters: sourceCRS - The source coordinate reference system. Parameters: targetCRS - The target coordinate reference system. Parameters: matrix - The matrix which describe an affine transform operation. The conversion or transformation. throws: FactoryException - if the operation can't be created. |
createFromMathTransform | protected CoordinateOperation createFromMathTransform(ReferenceIdentifier name, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform) throws FactoryException(Code) | | Creates a coordinate operation from a math transform.
Parameters: name - The identifier for the operation to be created. Parameters: sourceCRS - The source coordinate reference system. Parameters: targetCRS - The destination coordinate reference system. Parameters: transform - The math transform. A coordinate operation using the specified math transform. throws: FactoryException - if the operation can't be constructed. |
createFromMathTransform | protected CoordinateOperation createFromMathTransform(Map properties, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform, OperationMethod method, Class type) throws FactoryException(Code) | | Creates a coordinate operation from a math transform.
If the specified math transform is already a coordinate operation, and if source
and target CRS match, then
transform is returned with no change.
Otherwise, a new coordinate operation is created.
Parameters: properties - The properties to give to the operation. Parameters: sourceCRS - The source coordinate reference system. Parameters: targetCRS - The destination coordinate reference system. Parameters: transform - The math transform. Parameters: method - The operation method, or null . Parameters: type - The required super-class (e.g. .class ). A coordinate operation using the specified math transform. throws: FactoryException - if the operation can't be constructed. |
createFromParameters | protected CoordinateOperation createFromParameters(ReferenceIdentifier name, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, ParameterValueGroup parameters) throws FactoryException(Code) | | Creates a coordinate operation from a set of parameters.
The
is inferred automatically,
if possible.
Parameters: name - The identifier for the operation to be created. Parameters: sourceCRS - The source coordinate reference system. Parameters: targetCRS - The target coordinate reference system. Parameters: parameters - The parameters. The conversion or transformation. throws: FactoryException - if the operation can't be created. |
equalsIgnoreMetadata | static boolean equalsIgnoreMetadata(IdentifiedObject object1, IdentifiedObject object2)(Code) | | Compares the specified objects for equality. If both objects are Geotools
implementations of
,
then this method will ignore the metadata during the comparaison.
Parameters: object1 - The first object to compare (may be null). Parameters: object2 - The second object to compare (may be null). true if both objects are equals. false |
getDimension | static int getDimension(CoordinateReferenceSystem crs)(Code) | | Returns the dimension of the specified coordinate system,
or
0 if the coordinate system is null.
|
getErrorMessage | protected static String getErrorMessage(IdentifiedObject source, IdentifiedObject target)(Code) | | Returns an error message for "No path found from sourceCRS to targetCRS".
This is used for the construction of
OperationNotFoundException .
Parameters: source - The source CRS. Parameters: target - The target CRS. A default error message. |
getFactoryGroup | final FactoryGroup getFactoryGroup()(Code) | | Returns the set of helper methods on factories.
|
getMathTransformFactory | final public MathTransformFactory getMathTransformFactory()(Code) | | Returns the underlying math transform factory. This factory
is used for constructing
MathTransform objects for
all
.
|
getTemporaryName | static Map getTemporaryName(IdentifiedObject source)(Code) | | Returns a temporary name for object derived from the specified one.
Parameters: source - The CRS to base name on, or null if none. |
getTemporaryName | static Map getTemporaryName(CoordinateReferenceSystem source, CoordinateReferenceSystem target)(Code) | | Returns a temporary name for object derived from a concatenation.
Parameters: source - The CRS to base name on, or null if none. |
inverse | protected CoordinateOperation inverse(CoordinateOperation operation) throws NoninvertibleTransformException, FactoryException(Code) | | Returns the inverse of the specified operation.
Parameters: operation - The operation to invert. The inverse of operation . throws: NoninvertibleTransformException - if the operation is not invertible. throws: FactoryException - if the operation creation failed for an other reason. since: 2.3 |
swapAndScaleAxis | protected Matrix swapAndScaleAxis(CoordinateSystem sourceCS, CoordinateSystem targetCS) throws OperationNotFoundException(Code) | | Returns an affine transform between two coordinate systems. Only units and
axis order (e.g. transforming from (NORTH,WEST) to (EAST,NORTH)) are taken
in account.
Example: If coordinates in
sourceCS are (x,y) pairs in metres and
coordinates in
targetCS are (-y,x) pairs in centimetres, then the
transformation can be performed as below:
[-y(cm)] [ 0 -100 0 ] [x(m)]
[ x(cm)] = [ 100 0 0 ] [y(m)]
[ 1 ] [ 0 0 1 ] [1 ]
Parameters: sourceCS - The source coordinate system. Parameters: targetCS - The target coordinate system. The transformation from sourceCS to targetCS asan affine transform. Only axis orientation and units are taken in account. throws: OperationNotFoundException - If the affine transform can't be constructed. See Also: AbstractCS.swapAndScaleAxis |
Fields inherited from org.geotools.referencing.factory.ReferencingFactory | final public static Logger LOGGER(Code)(Java Doc)
|
Methods inherited from org.geotools.referencing.factory.ReferencingFactory | protected static void ensureNonNull(String name, Object object) throws InvalidParameterValueException(Code)(Java Doc) public Citation getVendor()(Code)(Java Doc)
|
|
|