org.cts.op
Class Geographic2Geocentric

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

public class Geographic2Geocentric
extends AbstractCoordinateOperation

Transform geographic coordinates (latitude, longitude, ellipsoidal height into geocentric coordinates.

Geographic coordinates and geocentric coordinates are supposed to use the same reference datum and to be standardized :

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
Geographic2Geocentric(Ellipsoid ellipsoid)
          Create a new Geographic2Geocentric transformation for a specific ellipsoid.
Geographic2Geocentric(Ellipsoid ellipsoid, double epsilon)
          Create a new Geographic2Geocentric transformation for a specific ellipsoid.
 
Method Summary
 boolean equals(Object o)
          Returns true if object is equals to this.
 Ellipsoid getEllipsoid()
           
 int hashCode()
          Returns the hash code for this Geographic2Geocentric.
 CoordinateOperation inverse()
          Creates the inverse CoordinateOperation.
 String toString()
          Return a String representation of this Geographic/Geocentric converter.
 double[] transform(double[] coord)
          Return coordinates representing the same point in a standard geocentric coordinate system.
 
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

Geographic2Geocentric

public Geographic2Geocentric(Ellipsoid ellipsoid)

Create a new Geographic2Geocentric transformation for a specific ellipsoid. The reference datum for both geographic and geocentric coordinates is the same.

Parameters:
ellipsoid - the ellipsoid used to define geographic coordinates

Geographic2Geocentric

public Geographic2Geocentric(Ellipsoid ellipsoid,
                             double epsilon)

Create a new Geographic2Geocentric transformation for a specific ellipsoid. The reference datum for both geographic and geocentric coordinates is the same.

Parameters:
ellipsoid - the ellipsoid used to define geographic coordinates
epsilon - stop condition for the Geocentric to Geographic transformation algorithm (epsilon is a value in radian, 1E-11 is the default epsilon and it means that error is less than 1E-4 m)
Method Detail

transform

public double[] transform(double[] coord)
                   throws IllegalCoordinateException
Return coordinates representing the same point in a standard geocentric coordinate system.

Specified by:
transform in interface CoordinateOperation
Specified by:
transform in class AbstractCoordinateOperation
Parameters:
coord - is an array containing 2 or 3 double representing geographic coordinates in the following order : latitude (radians), longitude (radians from Greenwich) and optionnaly ellipsoidal height (if coord contains only 2 double's, height is set to 0).
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

toString

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

Overrides:
toString in class IdentifiableComponent

getEllipsoid

public Ellipsoid getEllipsoid()

equals

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

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

hashCode

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

Overrides:
hashCode in class IdentifiableComponent


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