org.cts.op
Class LongitudeRotation

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

public class LongitudeRotation
extends AbstractCoordinateOperation

Longitude rotation is a simple transformation which shift the longitude parameter of a geographic coordinate.

Author:
Michaƫl Michaud

Field Summary
 
Fields inherited from class org.cts.op.AbstractCoordinateOperation
precision
 
Fields inherited from interface org.cts.Identifiable
DEFAULT, LOCAL, UNKNOWN
 
Constructor Summary
LongitudeRotation(double rotation)
          Create a new LongitudeRotation converter.
 
Method Summary
 boolean equals(Object o)
          Returns true if object is equals to this.
static LongitudeRotation getLongitudeRotationFrom(PrimeMeridian targetPM)
          Creates a new LongitudeRotation from this PrimeMeridian to Greenwich.
static LongitudeRotation getLongitudeRotationTo(PrimeMeridian targetPM)
          Creates a new LongitudeRotation from Greenwich to this PrimeMeridian.
 double getRotationAngle()
           
 int hashCode()
          Returns the hash code for this LongitudeRotation.
 CoordinateOperation inverse()
          Creates the inverse CoordinateOperation.
 String toString()
          Return a String representation of this Geographic/Geocentric converter.
 double[] transform(double[] coord)
          Return a coordinate representing the same point as coord but in a geographic coordinate system based on a different prime meridian.
 
Methods inherited from class org.cts.op.AbstractCoordinateOperation
getPrecision
 
Methods inherited from class org.cts.IdentifiableComponent
addAlias, addRemark, getAliases, getAuthorityKey, getAuthorityName, getCode, getComponent, getIdentifier, getName, getRemarks, getShortName, setIdentifier, setRemarks, setShortName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.cts.Identifiable
addAlias, addRemark, getAliases, getAuthorityKey, getAuthorityName, getCode, getName, getRemarks, getShortName, setRemarks, setShortName
 

Constructor Detail

LongitudeRotation

public LongitudeRotation(double rotation)

Create a new LongitudeRotation converter.

Parameters:
rotation - rotation angle in radians
Method Detail

transform

public double[] transform(double[] coord)
                   throws IllegalCoordinateException

Return a coordinate representing the same point as coord but in a geographic coordinate system based on a different prime meridian.

Specified by:
transform in interface CoordinateOperation
Specified by:
transform in class AbstractCoordinateOperation
Parameters:
coord - is an array containing 2 or 3 double representing geographic coordinate in the following order : latitude (radians), longitude (radians from Greenwich) and optionnaly ellipsoidal height
Returns:
a double array containing the output coordinate
Throws:
IllegalCoordinateException - if coord is not compatible with this CoordinateOperation.

inverse

public CoordinateOperation inverse()
                            throws NonInvertibleOperationException
Creates the inverse CoordinateOperation.

Specified by:
inverse in interface CoordinateOperation
Overrides:
inverse in class AbstractCoordinateOperation
Throws:
NonInvertibleOperationException

getLongitudeRotationTo

public static LongitudeRotation getLongitudeRotationTo(PrimeMeridian targetPM)
Creates a new LongitudeRotation from Greenwich to this PrimeMeridian.

Parameters:
targetPM - target prime meridian

getLongitudeRotationFrom

public static LongitudeRotation getLongitudeRotationFrom(PrimeMeridian targetPM)
Creates a new LongitudeRotation from this PrimeMeridian to Greenwich.

Parameters:
targetPM - target prime meridian

toString

public String toString()
Return a String representation of this Geographic/Geocentric converter.

Overrides:
toString in class IdentifiableComponent

getRotationAngle

public double getRotationAngle()

equals

public boolean equals(Object o)
Returns true if object is equals to this. Tests equality between the rotationAngles used by the transformation.

Overrides:
equals in class IdentifiableComponent
Parameters:
object - The object to compare this LongitudeRotation against

hashCode

public int hashCode()
Returns the hash code for this LongitudeRotation.

Overrides:
hashCode in class IdentifiableComponent


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