org.geotools.referencing.operation.transform
Class NZMGTransform

java.lang.Object
  extended byorg.geotools.referencing.wkt.Formattable
      extended byorg.geotools.referencing.operation.transform.AbstractMathTransform
          extended byorg.geotools.referencing.operation.transform.NZMGTransform
All Implemented Interfaces:
org.opengis.referencing.operation.MathTransform, org.opengis.referencing.operation.MathTransform2D, java.io.Serializable

public class NZMGTransform
extends AbstractMathTransform
implements org.opengis.referencing.operation.MathTransform2D, java.io.Serializable

Implementation of the nzmg (New Zealand Map Grid) projection.

This is an implementation of algorithm published by Land Information New Zealand. The algorithm is documented here.

See Also:
Serialized Form

Nested Class Summary
static class NZMGTransform.Provider
          The provider for NZMGTransform.
 
Field Summary
static double[][] A
           
static double[][] B
           
static double[] tphi
           
static double[] tpsi
           
 
Constructor Summary
NZMGTransform()
           
 
Method Summary
protected  double[] add(double[] c1, double[] c2)
          Adds to complex numbers.
protected  double[] divide(double[] c1, double[] c2)
          Divides one complex number by another.
 int getSourceDimensions()
          Gets the dimension of input points.
 int getTargetDimensions()
          Gets the dimension of output points.
 org.opengis.referencing.operation.MathTransform inverse()
          Creates the inverse transform of this object.
 void inverseTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
           
protected  double[] multiply(double[] c, double s)
          Multiplies a complex number by a scalar.
protected  double[] multiply(double[] c1, double[] c2)
          Multplies two complex numbers.
protected  double[] power(double[] c, int power)
          Computes the integer power of a complex number up to 6.
 void setCentralMeridian(double value)
           
 void setFalseEasting(double value)
           
 void setLatitudeOfOrigin(double value)
           
 void setNorthEasting(double value)
           
 void setSemiMajorAxis(double value)
           
 void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
           
 
Methods inherited from class org.geotools.referencing.operation.transform.AbstractMathTransform
createTransformedShape, derivative, derivative, ensureNonNull, equals, formatWKT, getDimSource, getDimTarget, getParameterDescriptors, getParameterValues, hashCode, isIdentity, needCopy, rollLongitude, transform, transform, transform
 
Methods inherited from class org.geotools.referencing.wkt.Formattable
toString, toWKT, toWKT, toWKT
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.referencing.operation.MathTransform2D
createTransformedShape, derivative, transform
 
Methods inherited from interface org.opengis.referencing.operation.MathTransform
derivative, getDimSource, getDimTarget, isIdentity, toWKT, transform, transform
 

Field Detail

A

public static double[][] A

B

public static double[][] B

tphi

public static double[] tphi

tpsi

public static double[] tpsi
Constructor Detail

NZMGTransform

public NZMGTransform()
Method Detail

getSourceDimensions

public int getSourceDimensions()
Description copied from class: AbstractMathTransform
Gets the dimension of input points.

Specified by:
getSourceDimensions in interface org.opengis.referencing.operation.MathTransform
Specified by:
getSourceDimensions in class AbstractMathTransform

getTargetDimensions

public int getTargetDimensions()
Description copied from class: AbstractMathTransform
Gets the dimension of output points.

Specified by:
getTargetDimensions in interface org.opengis.referencing.operation.MathTransform
Specified by:
getTargetDimensions in class AbstractMathTransform

setSemiMajorAxis

public void setSemiMajorAxis(double value)

setLatitudeOfOrigin

public void setLatitudeOfOrigin(double value)

setCentralMeridian

public void setCentralMeridian(double value)

setFalseEasting

public void setFalseEasting(double value)

setNorthEasting

public void setNorthEasting(double value)

transform

public void transform(double[] srcPts,
                      int srcOff,
                      double[] dstPts,
                      int dstOff,
                      int numPts)
               throws org.opengis.referencing.operation.TransformException
Specified by:
transform in interface org.opengis.referencing.operation.MathTransform
Throws:
org.opengis.referencing.operation.TransformException

inverseTransform

public void inverseTransform(double[] srcPts,
                             int srcOff,
                             double[] dstPts,
                             int dstOff,
                             int numPts)

inverse

public org.opengis.referencing.operation.MathTransform inverse()
                                                        throws org.opengis.referencing.operation.NoninvertibleTransformException
Description copied from class: AbstractMathTransform
Creates the inverse transform of this object. The default implementation returns if this transform is an identity transform, and throws a NoninvertibleTransformException otherwise. Subclasses should override this method.

Specified by:
inverse in interface org.opengis.referencing.operation.MathTransform
Overrides:
inverse in class AbstractMathTransform
Throws:
org.opengis.referencing.operation.NoninvertibleTransformException

multiply

protected double[] multiply(double[] c1,
                            double[] c2)
Multplies two complex numbers.

Parameters:
c1 - DOCUMENT ME!
c2 - DOCUMENT ME!
Returns:
DOCUMENT ME!

multiply

protected double[] multiply(double[] c,
                            double s)
Multiplies a complex number by a scalar.

Parameters:
c - DOCUMENT ME!
s - DOCUMENT ME!
Returns:
DOCUMENT ME!

divide

protected double[] divide(double[] c1,
                          double[] c2)
Divides one complex number by another.

Parameters:
c1 - DOCUMENT ME!
c2 - DOCUMENT ME!
Returns:
DOCUMENT ME!

add

protected double[] add(double[] c1,
                       double[] c2)
Adds to complex numbers.

Parameters:
c1 - DOCUMENT ME!
c2 - DOCUMENT ME!
Returns:
DOCUMENT ME!

power

protected double[] power(double[] c,
                         int power)
Computes the integer power of a complex number up to 6.

Parameters:
c - DOCUMENT ME!
power - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!


Copyright © GeoTools. All Rights Reserved.