org.deegree.cs.transformations.ntv2
Class NTv2Transformation

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

public class NTv2Transformation
extends Transformation

An NTv2 Transformation uses a GridShift file to transform ordinates defined in a source CRS based on a given ellipsoid to ordinates in a target CRS based on another ellipsoid. The Coordinate systems are normally GeographicCRSs.

Version:
$Revision: 30120 $, $Date: 2011-03-22 10:04:15 +0100 (Tue, 22 Mar 2011) $
Author:
Rutger Bezema, last edited by: $Author: aschmitz $

Constructor Summary
NTv2Transformation(ICRS sourceCRS, ICRS targetCRS, CRSResource id, au.com.objectix.jgridshift.GridShiftFile gsf)
           
NTv2Transformation(ICRS sourceCRS, ICRS targetCRS, CRSResource id, URL gridURL)
           
 
Method Summary
static Transformation createAxisAllignedNTv2Transformation(NTv2Transformation transform)
          Create a concatenated (swap) transform for the NTv2Transformation if the (GeographicCRS) source and target are not aligned with the expected lon/lat.
 List<javax.vecmath.Point3d> doTransform(List<javax.vecmath.Point3d> srcPts)
          Do a transformation, e.g. the incoming data will be transformed into other coordinates.
 URL getGridfile()
           
 au.com.objectix.jgridshift.GridShiftFile getGridfileRef()
           
 String getImplementationName()
           
 void inverse()
          This method flags the transformation about it's state.
 boolean isIdentity()
           
 
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

NTv2Transformation

public NTv2Transformation(ICRS sourceCRS,
                          ICRS targetCRS,
                          CRSResource id,
                          URL gridURL)
Parameters:
sourceCRS -
targetCRS -
id -
gridURL -

NTv2Transformation

public NTv2Transformation(ICRS sourceCRS,
                          ICRS targetCRS,
                          CRSResource id,
                          au.com.objectix.jgridshift.GridShiftFile gsf)
Parameters:
sourceCRS -
targetCRS -
id -
gsf - the loaded gridshift file
Method Detail

doTransform

public List<javax.vecmath.Point3d> doTransform(List<javax.vecmath.Point3d> srcPts)
                                        throws TransformationException
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
Throws:
TransformationException - if a transform could not be calculated.

getImplementationName

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

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)

getGridfile

public URL getGridfile()
Returns:
the url to the gridfile.

getGridfileRef

public au.com.objectix.jgridshift.GridShiftFile getGridfileRef()
Returns:
the loaded gridshift file

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

createAxisAllignedNTv2Transformation

public static final Transformation createAxisAllignedNTv2Transformation(NTv2Transformation transform)
Create a concatenated (swap) transform for the NTv2Transformation if the (GeographicCRS) source and target are not aligned with the expected lon/lat.

Parameters:
transform - to create a swap matrix for.
Returns:
the concatenated Swap tranformation for the given transform Matrix


Copyright © 2011. All Rights Reserved.