org.geotoolkit.referencing.operation
Class DefaultConcatenatedOperation

Object
  extended by FormattableObject
      extended by AbstractIdentifiedObject
          extended by AbstractCoordinateOperation
              extended by DefaultConcatenatedOperation
All Implemented Interfaces:
Serializable, Formattable, LenientComparable, IdentifiedObject, ConcatenatedOperation, CoordinateOperation

@Immutable
public class DefaultConcatenatedOperation
extends AbstractCoordinateOperation
implements ConcatenatedOperation

An ordered sequence of two or more single coordinate operations. The sequence of operations is constrained by the requirement that the source coordinate reference system of step (n+1) must be the same as the target coordinate reference system of step (n). The source coordinate reference system of the first step and the target coordinate reference system of the last step are the source and target coordinate reference system associated with the concatenated operation.

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

Field Summary
 
Fields inherited from class AbstractCoordinateOperation
domainOfValidity, EMPTY_ACCURACY_ARRAY, sourceCRS, targetCRS, transform
 
Fields inherited from class FormattableObject
EPSG, GEOTIFF, INTERNAL, OGC, SINGLE_LINE
 
Fields inherited from interface CoordinateOperation
COORDINATE_OPERATION_ACCURACY_KEY, DOMAIN_OF_VALIDITY_KEY, OPERATION_VERSION_KEY, SCOPE_KEY
 
Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
 
Constructor Summary
DefaultConcatenatedOperation(Map<String,?> properties, CoordinateOperation... operations)
          Constructs a concatenated operation from a set of properties.
DefaultConcatenatedOperation(Map<String,?> properties, CoordinateOperation[] operations, MathTransformFactory factory)
          Constructs a concatenated operation from a set of properties and a math transform factory.
DefaultConcatenatedOperation(String name, CoordinateOperation... operations)
          Constructs a concatenated operation from the specified name.
 
Method Summary
protected  int computeHashCode()
          Computes a hash value for this identified object.
 boolean equals(Object object, ComparisonMode mode)
          Compares this concatenated operation with the specified object for equality.
 String formatWKT(Formatter formatter)
          Formats this operation as a pseudo-WKT format.
 List<SingleOperation> getOperations()
          Returns the sequence of operations.
 
Methods inherited from class AbstractCoordinateOperation
getAccuracy, getAccuracy, getCoordinateOperationAccuracy, getDomainOfValidity, getMathTransform, getOperationVersion, getScope, getSourceCRS, getTargetCRS, getType
 
Methods inherited from class AbstractIdentifiedObject
equals, getAlias, getIdentifier, getIdentifiers, getName, getName, getRemarks, hashCode, nameMatches
 
Methods inherited from class FormattableObject
getDefaultIndentation, print, setDefaultIndentation, toString, toWKT, toWKT, toWKT
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface CoordinateOperation
getCoordinateOperationAccuracy, getDomainOfValidity, getMathTransform, getOperationVersion, getScope, getSourceCRS, getTargetCRS
 
Methods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
 

Constructor Detail

DefaultConcatenatedOperation

public DefaultConcatenatedOperation(String name,
                                    CoordinateOperation... operations)
Constructs a concatenated operation from the specified name.

Parameters:
name - The operation name.
operations - The sequence of operations.

DefaultConcatenatedOperation

public DefaultConcatenatedOperation(Map<String,?> properties,
                                    CoordinateOperation... operations)
Constructs a concatenated operation from a set of properties. The properties given in argument follow the same rules than for the super-class constructor.

Parameters:
properties - Set of properties. Should contains at least "name".
operations - The sequence of operations.

DefaultConcatenatedOperation

public DefaultConcatenatedOperation(Map<String,?> properties,
                                    CoordinateOperation[] operations,
                                    MathTransformFactory factory)
                             throws FactoryException
Constructs a concatenated operation from a set of properties and a math transform factory. The properties given in argument follow the same rules than for the super-class constructor.

Parameters:
properties - Set of properties. Should contains at least "name".
operations - The sequence of operations.
factory - The math transform factory to use for math transforms concatenation.
Throws:
FactoryException - if the factory can't concatenate the math transforms.
Method Detail

getOperations

public List<SingleOperation> getOperations()
Returns the sequence of operations.

Specified by:
getOperations in interface ConcatenatedOperation

equals

public boolean equals(Object object,
                      ComparisonMode mode)
Compares this concatenated operation with the specified object for equality. If the mode argument value is STRICT or BY_CONTRACT, then all available properties are compared including the domain of validity and the scope.

Specified by:
equals in interface LenientComparable
Overrides:
equals in class AbstractCoordinateOperation
Parameters:
object - The object to compare to this.
mode - STRICT for performing a strict comparison, or IGNORE_METADATA for comparing only properties relevant to transformations.
Returns:
true if both objects are equal.

computeHashCode

protected int computeHashCode()
Computes a hash value for this identified object. This method is invoked by AbstractIdentifiedObject.hashCode() when first needed.

Implementation specific feature
In the Geotk implementation, the name, identifiers and remarks are not used for hash code computation. Consequently two identified objects will return the same hash value if they are equal in the sense of equals(…, ComparisonMode.IGNORE_METADATA). This feature allows users to implement metadata-insensitive HashMap.

Overrides:
computeHashCode in class AbstractCoordinateOperation
Returns:
The hash code value. This value may change between different execution of the Geotk library.

formatWKT

public String formatWKT(Formatter formatter)
Formats this operation as a pseudo-WKT format. No WKT format were defined for coordinate operation at the time this method was written. This method may change in any future version until a standard format is found.

Specified by:
formatWKT in interface Formattable
Overrides:
formatWKT in class AbstractCoordinateOperation
Parameters:
formatter - The formatter to use.
Returns:
The WKT element name.
See Also:
FormattableObject.toWKT(), FormattableObject.toString()


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