org.cts.op
Class IterativeTransformation

java.lang.Object
  extended by org.cts.IdentifiableComponent
      extended by org.cts.op.AbstractCoordinateOperation
          extended by org.cts.op.IterativeTransformation
All Implemented Interfaces:
Identifiable, CoordinateOperation

public class IterativeTransformation
extends AbstractCoordinateOperation
implements CoordinateOperation

The IterativeTransformation is used to repeat a CoordinateOperation until one ore more coordinate(s) converge to predifined values (saved in additional dimensions using MemorizeCoordinate). This transformation should be used when an iterative process is recommended (for instance when using a grid using longitude and latitude calculated by a first approximate transformation.

Author:
Jules Party

Field Summary
 
Fields inherited from class org.cts.op.AbstractCoordinateOperation
precision
 
Fields inherited from interface org.cts.Identifiable
DEFAULT, LOCAL, UNKNOWN
 
Constructor Summary
IterativeTransformation(CoordinateOperation op, int[] realValueIndex, int[] calculatedValueIndex, double[] tol)
          Build a new IterativeTransformation.
 
Method Summary
 double[] transform(double[] coord)
          Return a double[] representing the same location as coord but in another CoordinateReferenceSystem.
 
Methods inherited from class org.cts.op.AbstractCoordinateOperation
getPrecision, inverse
 
Methods inherited from class org.cts.IdentifiableComponent
addAlias, addRemark, equals, getAliases, getAuthorityKey, getAuthorityName, getCode, getComponent, getIdentifier, getName, getRemarks, getShortName, hashCode, setIdentifier, setRemarks, setShortName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.cts.op.CoordinateOperation
getPrecision, inverse
 
Methods inherited from interface org.cts.Identifiable
addAlias, addRemark, getAliases, getAuthorityKey, getAuthorityName, getCode, getName, getRemarks, getShortName, setRemarks, setShortName
 

Constructor Detail

IterativeTransformation

public IterativeTransformation(CoordinateOperation op,
                               int[] realValueIndex,
                               int[] calculatedValueIndex,
                               double[] tol)
                        throws Exception
Build a new IterativeTransformation.

Parameters:
op - the transformation to iterate
realValueIndex - a list of index refering to the reference values the iteration should reach
calculatedValueIndex - the list of index refering to the calculated values that must reach the reference values defined above
tol - the maximal difference accepted between the real value and the target value
Throws:
Exception - when the arrayx in parameter does not have the same length
Method Detail

transform

public double[] transform(double[] coord)
                   throws IllegalCoordinateException
Description copied from class: AbstractCoordinateOperation
Return a double[] representing the same location as coord but in another CoordinateReferenceSystem.

Specified by:
transform in interface CoordinateOperation
Specified by:
transform in class AbstractCoordinateOperation
Parameters:
coord - the input coordinate
Returns:
a double array containing the output coordinate
Throws:
IllegalCoordinateException - if coord is not compatible with this CoordinateOperation.


Copyright © 2014 IRSTV CNRS-FR-2488. All Rights Reserved.