org.geotools.referencing.datum
Class BursaWolfParameters

Object
  extended by Formattable
      extended by BursaWolfParameters
All Implemented Interfaces:
Serializable, Cloneable

public class BursaWolfParameters
extends Formattable
implements Cloneable, Serializable

Parameters for a geographic transformation between two datum. The Bursa Wolf parameters should be applied to geocentric coordinates, where the X axis points towards the Greenwich Prime Meridian, the Y axis points East, and the Z axis points North. The "Bursa-Wolf" formula is expressed in matrix form with 7 parameters:

Since:
2.1
Author:
Martin Desruisseaux (IRD)
See Also:
Serialized Form
Module:

Field Summary
 double dx
          Bursa Wolf shift in meters.
 double dy
          Bursa Wolf shift in meters.
 double dz
          Bursa Wolf shift in meters.
 double ex
          Bursa Wolf rotation in arc seconds.
 double ey
          Bursa Wolf rotation in arc seconds.
 double ez
          Bursa Wolf rotation in arc seconds.
 double ppm
          Bursa Wolf scaling in parts per million.
 GeodeticDatum targetDatum
          The target datum for this parameters.
 
Fields inherited from class Formattable
SINGLE_LINE
 
Constructor Summary
BursaWolfParameters(GeodeticDatum target)
          Constructs a transformation info with all parameters set to 0.
 
Method Summary
 BursaWolfParameters clone()
          Returns a copy of this object.
 boolean equals(Object object)
          Compares the specified object with this object for equality.
protected  String formatWKT(Formatter formatter)
          Format the inner part of a Well Known Text (WKT) element.
 XMatrix getAffineTransform()
          Returns an affine transform that can be used to define this Bursa Wolf transformation.
 int hashCode()
          Returns a hash value for this object.
 boolean isIdentity()
          Returns true if this Bursa Wolf parameters performs no operation.
 boolean isTranslation()
          Returns true if this Bursa Wolf parameters contains only translation terms.
 void setAffineTransform(Matrix matrix, double eps)
          Sets transformation info from the specified matrix, which must be affine.
 
Methods inherited from class Formattable
toString, toWKT, toWKT, toWKT
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

dx

public double dx
Bursa Wolf shift in meters.


dy

public double dy
Bursa Wolf shift in meters.


dz

public double dz
Bursa Wolf shift in meters.


ex

public double ex
Bursa Wolf rotation in arc seconds.


ey

public double ey
Bursa Wolf rotation in arc seconds.


ez

public double ez
Bursa Wolf rotation in arc seconds.


ppm

public double ppm
Bursa Wolf scaling in parts per million.


targetDatum

public final GeodeticDatum targetDatum
The target datum for this parameters.

Constructor Detail

BursaWolfParameters

public BursaWolfParameters(GeodeticDatum target)
Constructs a transformation info with all parameters set to 0.

Parameters:
target - The target datum for this parameters.
Method Detail

isIdentity

public boolean isIdentity()
Returns true if this Bursa Wolf parameters performs no operation. This is true when all parameters are set to zero.

Returns:
true if the parameters describe no operation.

isTranslation

public boolean isTranslation()
Returns true if this Bursa Wolf parameters contains only translation terms.

Returns:
true if the parameters describe to a translation only.

getAffineTransform

public XMatrix getAffineTransform()
Returns an affine transform that can be used to define this Bursa Wolf transformation. The formula is as follows:
 S = 1 + ppm/1000000

 [ X’ ]    [     S   -ez*S   +ey*S   dx ]  [ X ]
 [ Y’ ]  = [ +ez*S       S   -ex*S   dy ]  [ Y }
 [ Z’ ]    [ -ey*S   +ex*S       S   dz ]  [ Z ]
 [ 1  ]    [     0       0       0    1 ]  [ 1 ]
 
This affine transform can be applied on geocentric coordinates.

Returns:
An affine transform created from the parameters.

setAffineTransform

public void setAffineTransform(Matrix matrix,
                               double eps)
                        throws IllegalArgumentException
Sets transformation info from the specified matrix, which must be affine. In addition, the matrix minus the last row and last column must be antisymmetric.

Parameters:
matrix - The matrix to fit as a Bursa-Wolf construct.
eps - The tolerance error for the antisymmetric matrix test. Should be a small number like 1E-4.
Throws:
IllegalArgumentException - if the specified matrix doesn't meet the conditions.
Since:
2.2

hashCode

public int hashCode()
Returns a hash value for this object.

Overrides:
hashCode in class Object
Returns:
The hash code value. This value doesn't need to be the same in past or future versions of this class.

clone

public BursaWolfParameters clone()
Returns a copy of this object.

Overrides:
clone in class Object
Returns:
A clone of the parameters.

equals

public boolean equals(Object object)
Compares the specified object with this object for equality.

Overrides:
equals in class Object
Parameters:
object - The object to compare with the parameters.
Returns:
true if the given object is equals to the parameters.

formatWKT

protected String formatWKT(Formatter formatter)
Format the inner part of a Well Known Text (WKT) element. The WKT contains the parameters in translation, rotation, scale order, as in TOWGS84[dx, dy, dz, ex, ey, ez, ppm].

Overrides:
formatWKT in class Formattable
Parameters:
formatter - The formatter to use.
Returns:
The WKT element name.
See Also:
Formattable.toWKT(), Formattable.toString()


Copyright © 1996-2009 Geotools. All Rights Reserved.