public class NTv2Transform extends AbstractMathTransform implements MathTransform2D, Serializable
This transformation depends on an external resource (the NTv2 grid file). If the file is not
available, a recoverable NoSuchIdentifierException
will be
thrown on instantiation.
IdentifiedObjectSet IdentifiedObjectSet exception handling}.
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
NTv2Transform.Provider
The
NTv2Transform provider. |
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOGGER
Logger
|
SINGLE_LINE
Constructor and Description |
---|
NTv2Transform(URI file)
Constructs a
NTv2Transform from the specified grid shift file. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
Compares the specified object with this one for equality.
|
ParameterValueGroup |
getParameterValues()
Returns the parameter values for this math transform.
|
int |
getSourceDimensions()
Gets the dimension of input points.
|
int |
getTargetDimensions()
Gets the dimension of output points.
|
int |
hashCode()
Returns a hash value for this transform.
|
MathTransform2D |
inverse()
Returns the inverse of this transform.
|
void |
inverseTransform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Inverse transform.
|
void |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transforms a list of coordinate point ordinal values.
|
createTransformedShape, derivative, derivative, ensureNonNull, formatWKT, getName, getParameterDescriptors, isIdentity, needCopy, normalizeAngle, rollLongitude, transform, transform, transform, transform, transform
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKT
createTransformedShape, derivative, transform
derivative, isIdentity, toWKT, transform, transform, transform, transform
protected static final Logger LOGGER
public NTv2Transform(URI file) throws NoSuchIdentifierException
NTv2Transform
from the specified grid shift file.
This constructor checks for grid shift file availability, but doesn't actually load the full grid into memory to preserve resources.
file
- NTv2 grid file nameNoSuchIdentifierException
- if the grid is not available.public int hashCode()
hashCode
in class AbstractMathTransform
public boolean equals(Object object)
object
is this
same instance, or a NTv2Transform with the same parameter values.equals
in class AbstractMathTransform
object
- The object to compare with this transform.true
if the given object is this
, or a NTv2Transform with same
parameter values, which would mean that given identical source position, the transformed position would be the same.public MathTransform2D inverse()
inverse
in interface MathTransform
inverse
in interface MathTransform2D
inverse
in class AbstractMathTransform
public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws TransformException
x1,y1,z1 ...).
transform
in interface MathTransform
srcPts
- the array containing the source point coordinates.srcOff
- the offset to the first point to be transformed in the source array.dstPts
- the array into which the transformed point coordinates are returned. May be the
same than srcPts
.dstOff
- the offset to the location of the first transformed point that is stored in the
destination array.numPts
- the number of point objects to be transformed.TransformException
- if an IO error occurs reading the grid file.public void inverseTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws TransformException
transform(double[], int, double[], int, int)
srcPts
- the array containing the source point coordinates.srcOff
- the offset to the first point to be transformed in the source array.dstPts
- the array into which the transformed point coordinates are returned. May be the
same than srcPts
.dstOff
- the offset to the location of the first transformed point that is stored in the
destination array.numPts
- the number of point objects to be transformed.TransformException
- if an IO error occurs reading the grid file.public int getSourceDimensions()
AbstractMathTransform
getSourceDimensions
in interface MathTransform
getSourceDimensions
in class AbstractMathTransform
public int getTargetDimensions()
AbstractMathTransform
getTargetDimensions
in interface MathTransform
getTargetDimensions
in class AbstractMathTransform
public ParameterValueGroup getParameterValues()
getParameterValues
in class AbstractMathTransform
Operation.getParameterValues()
Copyright © 1996–2019 Geotools. All rights reserved.