org.geotoolkit.referencing.operation.transform
Class AbstractMathTransform2D.Parameters

Object
  extended by AbstractMathTransform2D.Parameters
All Implemented Interfaces:
Serializable, Parameterized
Direct Known Subclasses:
UnitaryProjection.Parameters
Enclosing class:
AbstractMathTransform2D

protected abstract static class AbstractMathTransform2D.Parameters
extends Object
implements Parameterized, Serializable

The parameters of the enclosing transform as a tuple of (normalizenon-linear kerneldenormalize) transforms. The normalize and denormalize parts must be affine transforms. The non-linear part in the middle is conceptually the enclosing AbstractMathTransform2D. However this Parameters class does not keep a reference to the enclosing transform because parameters are typically unmarshalled before the transform is instantiated.

This object is used mostly for Geotk implementation of map projections, where the kernel is a unitary projection. See the projection package for details.

Note: Serialization of this class is appropriate for short-term storage or RMI use, but may not be compatible with future versions. For long term storage, WKT (Well Know Text) or XML are more appropriate.

Since:
3.00
Version:
3.00
Author:
Martin Desruisseaux (Geomatys)
See Also:
Serialized Form
Module:
referencing/geotk-referencing (download)    View source code for this class

Constructor Summary
protected AbstractMathTransform2D.Parameters(ParameterDescriptorGroup descriptor)
          Creates a new Parameters.
 
Method Summary
 MathTransform2D createConcatenatedTransform(MathTransform2D kernel)
          Creates a chain of concatenated transforms from the normalize transform, the given kernel and the denormalize transform.
 boolean equals(Object object)
          Compares the given object with the parameters for equality.
 ParameterDescriptorGroup getParameterDescriptors()
          Returns the descriptor that represents this tuple as a whole.
abstract  ParameterValueGroup getParameterValues()
          Returns the parameters that describe this tuple as a whole.
 int hashCode()
          Returns a hash code value for this object.
 AffineTransform normalize(boolean norm)
          The affine transforms to be applied before or after the kernel operation.
 String toString()
          Returns a string representation of the parameters.
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractMathTransform2D.Parameters

protected AbstractMathTransform2D.Parameters(ParameterDescriptorGroup descriptor)
Creates a new Parameters. The descriptor argument shall describe the parameters of this tuple as a whole, including the affine transforms applied before and after the kernel. Subclasses shall initialize those normalize/denormalize affine transforms when they have enough information for doing so.

Parameters:
descriptor - The descriptor that represents this tuple as a whole.
Method Detail

normalize

public final AffineTransform normalize(boolean norm)
The affine transforms to be applied before or after the kernel operation. Those affines are initially identity transforms. Subclasses should invoke this method at construction time (or at some time close to construction) in order to set the affine coefficients.
Note: The normalize/denormalize affine transforms will stop being mutable when the createConcatenatedTransform(MathTransform2D) method is invoked for the first time.

Parameters:
norm - true for fetching the normalize transform to apply before the kernel, or false for the denormalize transform to apply after the kernel.
Returns:
The requested normalize (true) or denormalize (false) transform.

createConcatenatedTransform

public MathTransform2D createConcatenatedTransform(MathTransform2D kernel)
Creates a chain of concatenated transforms from the normalize transform, the given kernel and the denormalize transform. The normalize/denormalize transforms are replaced by immutable instances of AffineTransform2D the first time this method is invoked, since they will be injected in the chain of concatenated transforms.

Parameters:
kernel - The (usually non-linear) kernel.
Returns:
The concatenation of (normalize – the given kernel – denormalize) transforms.

getParameterDescriptors

public ParameterDescriptorGroup getParameterDescriptors()
Returns the descriptor that represents this tuple as a whole. The parameter values may take effect in either the normalize/denormalize transforms or in the kernel.
Note: The definition of "kernel" is left to implementors. In the particular case of map projections, kernel are subclasses of UnitaryProjection
.

Specified by:
getParameterDescriptors in interface Parameterized
Returns:
The description of the parameters.
See Also:
OperationMethod.getParameters()

getParameterValues

public abstract ParameterValueGroup getParameterValues()
Returns the parameters that describe this tuple as a whole. Changes to the returned parameters will not affect this object.

Specified by:
getParameterValues in interface Parameterized
Returns:
A copy of the parameter values.
See Also:
SingleOperation.getParameterValues()

hashCode

public int hashCode()
Returns a hash code value for this object. This value is implementation-dependent and may change in any future version.

Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Compares the given object with the parameters for equality.

Overrides:
equals in class Object
Parameters:
object - The object to compare with the parameters.
Returns:
true if the given object is equal to this one.

toString

public String toString()
Returns a string representation of the parameters. The default implementation formats the parameters values as a table.

Overrides:
toString in class Object


Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.