org.deegree.cs.transformations.coordinate
Class GeocentricTransform

java.lang.Object
  extended by org.deegree.cs.CRSIdentifiable
      extended by org.deegree.cs.transformations.Transformation
          extended by org.deegree.cs.transformations.coordinate.GeocentricTransform
All Implemented Interfaces:
Object, TypedObjectNode, CRSResource

public class GeocentricTransform
extends Transformation

The GeocentricTransform class is used to create a transformation between a geocentric CRS (having lat-lon coordinates) and it's geodetic CRS (having x-y-z) coordinates and vice versa.

Version:
$Revision: 30799 $, $Date: 2011-05-12 16:33:22 +0200 (Thu, 12 May 2011) $
Author:
Rutger Bezema, last edited by: $Author: lbuesching $

Constructor Summary
GeocentricTransform(ICRS source, IGeocentricCRS target)
           
GeocentricTransform(ICRS source, IGeocentricCRS target, CRSResource id)
           
 
Method Summary
 List<javax.vecmath.Point3d> doTransform(List<javax.vecmath.Point3d> srcPts)
          Do a transformation, e.g. the incoming data will be transformed into other coordinates.
 String getImplementationName()
           
 double getSemiMajorAxis()
           
 double getSemiMinorAxis()
           
 void inverse()
          This method flags the transformation about it's state.
 boolean isIdentity()
           
protected  void toGeoCentric(List<javax.vecmath.Point3d> srcPts)
          Converts geographic (longitude, latitude, height) to cartesian (x,y,z) coordinates.
protected  void toGeographic(List<javax.vecmath.Point3d> srcPts)
          Converts geocentric coordinates (x, y, z) to geodetic coordinates (longitude, latitude, height), according to the current ellipsoid parameters.
 
Methods inherited from class org.deegree.cs.transformations.Transformation
areInverse, canTransform, contains, copyTransformation, createFromTo, doTransform, doTransform, equalOnCRS, equals, getSourceCRS, getSourceDimension, getTargetCRS, getTargetDimension, getTransformationName, getTransformationPath, isInverseTransform, setSourceCRS
 
Methods inherited from class org.deegree.cs.CRSIdentifiable
addAreaOfUse, addName, checkForNullObject, checkForNullObject, checkForNullObject, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getCode, getCodeAndName, getCodes, getDescription, getDescriptions, getId, getName, getNames, getOrignalCodeStrings, getVersion, getVersions, hasCode, hashCode, hasId, hasIdOrName, setDefaultAreaOfUse, setDefaultDescription, setDefaultId, setDefaultName, setDefaultVersion, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeocentricTransform

public GeocentricTransform(ICRS source,
                           IGeocentricCRS target,
                           CRSResource id)
Parameters:
source - the geographic crs.
target - the geocentric crs.
id - an identifiable instance containing information about this transformation

GeocentricTransform

public GeocentricTransform(ICRS source,
                           IGeocentricCRS target)
Parameters:
source - the geographic crs.
target - the geocentric crs.
Method Detail

inverse

public void inverse()
Description copied from class: Transformation
This method flags the transformation about it's state. If this transformation was inverse calling this method will result in a forward transformation and vice versa.

Overrides:
inverse in class Transformation

doTransform

public List<javax.vecmath.Point3d> doTransform(List<javax.vecmath.Point3d> srcPts)
Description copied from class: Transformation
Do a transformation, e.g. the incoming data will be transformed into other coordinates.

Specified by:
doTransform in class Transformation
Parameters:
srcPts - the points which must be transformed, expected are following values either, long_1, lat_1, height_1, long_2, lat_2, height_2. or long_1, lat_1, long_2, lat_2
Returns:
the transformed points

toGeographic

protected void toGeographic(List<javax.vecmath.Point3d> srcPts)
Converts geocentric coordinates (x, y, z) to geodetic coordinates (longitude, latitude, height), according to the current ellipsoid parameters. The method used here is derived from "An Improved Algorithm for Geocentric to Geodetic Coordinate Conversion", by Ralph Toms, Feb 1996 UCRL-JC-123138.

Parameters:
srcPts - the points which must be transformed.

toGeoCentric

protected void toGeoCentric(List<javax.vecmath.Point3d> srcPts)
Converts geographic (longitude, latitude, height) to cartesian (x,y,z) coordinates.

Parameters:
srcPts - to convert.

isIdentity

public boolean isIdentity()
Specified by:
isIdentity in class Transformation
Returns:
true if this transformation doesn't transform the incoming points. (e.g. is the id. matrix)

getSemiMajorAxis

public final double getSemiMajorAxis()
Returns:
the semiMajorAxis.

getSemiMinorAxis

public final double getSemiMinorAxis()
Returns:
the semiMinorAxis.

getImplementationName

public String getImplementationName()
Specified by:
getImplementationName in class Transformation
Returns:
the name of the transformation.


Copyright © 2011. All Rights Reserved.