gistoolkit.projection.ellipsoid.transform
Class PositionVectorTransform

java.lang.Object
  extended bygistoolkit.projection.ellipsoid.transform.EllipsoidTransform
      extended bygistoolkit.projection.ellipsoid.transform.PositionVectorTransform
Direct Known Subclasses:
CoordinateFrameRotation

public class PositionVectorTransform
extends EllipsoidTransform

Coppied from EPSG Transformation Methods.

Transformation of coordinates from one geographic coordinate system into another (also known as a "datum transformation") is usually carried out as an implicit concatenation of three transformations: [geographical to geocentric >> geocentric to geocentric >> geocentric to geographic] The middle part of the concatenated transformation, from geocentric to geocentric, is usually described as a simplified 7-parameter Helmert transformation, expressed in matrix form with 7 parameters, in what is known as the "Bursa-Wolf" formula:

   (X’)         (  1     -Rz    +Ry)     (X)    (dX)
   (Y’)  =  M * ( +Rz     1     -Rx)  *  (Y)  + (dY)
   (Z’)         ( -Ry   +Rx      1 )     (Z)    (dZ)
 
The parameters are commonly referred to defining the datum transformation "from Datum 'A' to Datum 'B'", whereby (X, Y, Z) are the geocentric coordinates of the point on Datum ‘A’ and (X’, Y’, Z’) are the geocentric coordinates of the point on Datum ‘B’. However, that does not define the parameters uniquely; neither is the definition of the parameters implied in the formula, as is often believed. However, the following definition, which is consistent witth the "Position Vector Transformation" convention, is common E&P survey practice: (dX, dY, dZ) :Translation vector, to be added to the point's position vector in coordinate system 'A' in order to transform from system 'A' to system 'B'; also: the coordinates of the origin of system 'A' in the 'B' frame. (Rx, Ry, Rz) :Rotations to be applied to the point's vector. The sign convention is such that a positive rotation about an axis is defined as a clockwise rotation of the position vector when viewed from the origin of the Cartesian coordinate system in the positive direction of that axis. E.g. a positive rotation about the Z-axis only from system 'A' to system 'B' will result in a larger longitude value for the point in system 'B'. M : The scale correction to be made to the position vector in coordinate system 'A' in order to obtain the correct scale of coordinate system 'B'. M = (1+S*10 6), whereby S is the scale correction expressed in parts per million.

Author:
ithaqua

Nested Class Summary
(package private)  class PositionVectorTransform.EditPanel
           
 
Field Summary
protected  double myScale
          The scale value to apply to the entire transform in parts per million, or 1e-6
protected  double myXr
          The rotation to apply to the X coordinated
protected  double myXt
          The translation to apply to the X coordinated
protected  double myYr
          The rotation to apply to the Y coordinated
protected  double myYt
          The translation to apply to the Y coordinated
protected  double myZr
          The rotation to apply to the Z coordinated
protected  double myZt
          The translation to apply to the Z coordinated
 
Constructor Summary
PositionVectorTransform()
          Creates a new PositionVectorTransform
PositionVectorTransform(Ellipsoid inFromEllipsoid, Ellipsoid inToEllipsoid, double inXTranslation, double inYTranslation, double inZTranslation, double inXRotation, double inYRotation, double inZRotation, double inScaleDifference)
          Creates new PositionVectorTransform.
 
Method Summary
protected  void doForward(Point inPoint)
          Transform the coordinates in the forward direction
protected  void doReverse(Point inPoint)
          Transform the coordinates in the reverse direction
 TransformEditPanel getEditPanel()
          Create an edit panel to allow the user to edit this transform
 double getScale()
          Get the scale value to apply to the entire transform in parts per million (ppm) or 1e-6
 double getXRotation()
          Retrieve the rotation to apply to the X coordinate
 double getXTranslation()
          Retrieve the translation to apply to the X coordinate
 double getYRotation()
          Retrieve the rotation to apply to the Y coordinate
 double getYTranslation()
          Retrieve the translation to apply to the Y coordinate
 double getZRotation()
          Retrieve the rotation to apply to the Z coordinate
 double getZTranslation()
          Retrieve the translation to apply to the Z coordinate
static void main(java.lang.String[] inargs)
          Test this transform
 void setParameter(java.lang.String inName, java.lang.String inValue)
          Set the given parameter to the given value
 void setScale(double inScale)
          Set the scale value to apply to the entire transform in parts per million (ppm) or 1e-6
 void setXRotation(double inXRotation)
          Set the rotation to apply to the X coordinate
 void setXTranslation(double inXTranslation)
          Set the translation to apply to the X coordinate
 void setYRotation(double inYRotation)
          Set the rotation to apply to the Y coordinate
 void setYTranslation(double inYTranslation)
          Set the translation to apply to the Y coordinate
 void setZRotation(double inZRotation)
          Set the rotation to apply to the Z coordinate
 void setZTranslation(double inZTranslation)
          Set the translation to apply to the Z coordinate
 
Methods inherited from class gistoolkit.projection.ellipsoid.transform.EllipsoidTransform
forward, getFromEllipsoid, getIsReversed, getName, getToEllipsoid, reverse, setFromEllipsoid, setIsReversed, setName, setToEllipsoid, toCartesian, toPolar, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myXt

protected double myXt
The translation to apply to the X coordinated


myXr

protected double myXr
The rotation to apply to the X coordinated


myYt

protected double myYt
The translation to apply to the Y coordinated


myYr

protected double myYr
The rotation to apply to the Y coordinated


myZt

protected double myZt
The translation to apply to the Z coordinated


myZr

protected double myZr
The rotation to apply to the Z coordinated


myScale

protected double myScale
The scale value to apply to the entire transform in parts per million, or 1e-6

Constructor Detail

PositionVectorTransform

public PositionVectorTransform()
Creates a new PositionVectorTransform


PositionVectorTransform

public PositionVectorTransform(Ellipsoid inFromEllipsoid,
                               Ellipsoid inToEllipsoid,
                               double inXTranslation,
                               double inYTranslation,
                               double inZTranslation,
                               double inXRotation,
                               double inYRotation,
                               double inZRotation,
                               double inScaleDifference)
Creates new PositionVectorTransform. The To and From ellipsoids provide the reference frame. The STranslation and YTranslation are in the units of measure of the ellipsoids The Rotation parameters must be epxressed in decimal degreese. The scale difference is expressed in parts per million or ppm.

Method Detail

setXTranslation

public void setXTranslation(double inXTranslation)
Set the translation to apply to the X coordinate


getXTranslation

public double getXTranslation()
Retrieve the translation to apply to the X coordinate


setXRotation

public void setXRotation(double inXRotation)
Set the rotation to apply to the X coordinate


getXRotation

public double getXRotation()
Retrieve the rotation to apply to the X coordinate


setYTranslation

public void setYTranslation(double inYTranslation)
Set the translation to apply to the Y coordinate


getYTranslation

public double getYTranslation()
Retrieve the translation to apply to the Y coordinate


setYRotation

public void setYRotation(double inYRotation)
Set the rotation to apply to the Y coordinate


getYRotation

public double getYRotation()
Retrieve the rotation to apply to the Y coordinate


setZTranslation

public void setZTranslation(double inZTranslation)
Set the translation to apply to the Z coordinate


getZTranslation

public double getZTranslation()
Retrieve the translation to apply to the Z coordinate


setZRotation

public void setZRotation(double inZRotation)
Set the rotation to apply to the Z coordinate


getZRotation

public double getZRotation()
Retrieve the rotation to apply to the Z coordinate


setScale

public void setScale(double inScale)
Set the scale value to apply to the entire transform in parts per million (ppm) or 1e-6


getScale

public double getScale()
Get the scale value to apply to the entire transform in parts per million (ppm) or 1e-6


doForward

protected void doForward(Point inPoint)
Transform the coordinates in the forward direction

Specified by:
doForward in class EllipsoidTransform

doReverse

protected void doReverse(Point inPoint)
Transform the coordinates in the reverse direction

Specified by:
doReverse in class EllipsoidTransform

setParameter

public void setParameter(java.lang.String inName,
                         java.lang.String inValue)
Set the given parameter to the given value

Specified by:
setParameter in class EllipsoidTransform

getEditPanel

public TransformEditPanel getEditPanel()
Create an edit panel to allow the user to edit this transform

Overrides:
getEditPanel in class EllipsoidTransform

main

public static void main(java.lang.String[] inargs)
Test this transform