org.geotoolkit.referencing.operation.projection
Class NewZealandMapGrid
Object
FormattableObject
AbstractMathTransform
AbstractMathTransform2D
UnitaryProjection
NewZealandMapGrid
- All Implemented Interfaces:
- Serializable, Formattable, Parameterized, LenientComparable, MathTransform, MathTransform2D
@Immutable
public class NewZealandMapGrid
- extends UnitaryProjection
New Zealand Map Grid (NZMG) projection (EPSG code 9811).
See any of the following providers for a list of programmatic parameters:
Description
This is an implementation of algorithm published by
Land Information New Zealand.
The algorithm is documented here.
Note:
This class makes extensive use of Complex type which may be costly
unless the compiler can inline on the stack. We assume that Jave 6 and above can
do this optimization.
- Since:
- 2.2
- Version:
- 3.20
- Author:
- Justin Deoliveira (Refractions), Martin Desruisseaux (IRD, Geomatys)
- See Also:
- Serialized Form
- Module:
|
Method Summary |
static MathTransform2D |
create(ParameterDescriptorGroup descriptor,
ParameterValueGroup values)
Creates an NZMG projection from the given parameters. |
protected void |
inverseTransform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff)
Transforms the specified (x,y) coordinates
and stores the result in dstPts (angles in radians). |
Matrix |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
boolean derivate)
Converts the specified (λ,φ) coordinate (units in radians)
and stores the result in dstPts (linear distance on a unit sphere). |
| Methods inherited from class AbstractMathTransform |
createTransformedShape, derivative, derivative, ensureNonNull, equals, formatWKT, getName, hashCode, isIdentity, rollLongitude, transform, transform, transform, transform, transform |
NewZealandMapGrid
protected NewZealandMapGrid(UnitaryProjection.Parameters parameters)
- Constructs a new map projection from the supplied parameters.
- Parameters:
parameters - The parameters of the projection to be created.
create
public static MathTransform2D create(ParameterDescriptorGroup descriptor,
ParameterValueGroup values)
- Creates an NZMG projection from the given parameters. The descriptor argument is usually
NewZealandMapGrid.PARAMETERS, but is
not restricted to. If a different descriptor is supplied, it is user's responsibility to
ensure that it is suitable to a NZMG projection.
- Parameters:
descriptor - Typically NewZealandMapGrid.PARAMETERS.values - The parameter values of the projection to create.
- Returns:
- The map projection.
- Since:
- 3.00
transform
public Matrix transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
boolean derivate)
throws ProjectionException
- Converts the specified (λ,φ) coordinate (units in radians)
and stores the result in
dstPts (linear distance on a unit sphere).
- Specified by:
transform in class UnitaryProjection
- Parameters:
srcPts - The array containing the source point coordinate, as (longitude,
latitude) angles in radians.srcOff - The offset of the point to be converted in the source array.dstPts - The array into which the converted point coordinate is returned (may be
the same than srcPts). Ordinates will be expressed in a dimensionless
unit, as a linear distance on a unit sphere or ellipse.dstOff - The offset of the location of the converted point that is
stored in the destination array.derivate - true for computing the derivative, or false if not needed.
- Returns:
- The matrix of the projection derivative at the given source position, or
null
if the derivate argument is false.
- Throws:
ProjectionException - if the point can't be converted.- Since:
- 3.20 (derived from 3.00)
- See Also:
AbstractMathTransform.derivative(DirectPosition),
AbstractMathTransform.transform(DirectPosition, DirectPosition),
MathTransforms.derivativeAndTransform(MathTransform, double[], int, double[], int)
inverseTransform
protected void inverseTransform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff)
throws ProjectionException
- Transforms the specified (x,y) coordinates
and stores the result in
dstPts (angles in radians).
- Specified by:
inverseTransform in class UnitaryProjection
- Parameters:
srcPts - The array containing the source point coordinate, as linear distance
on a unit sphere or ellipse.srcOff - The offset of the point to be converted in the source array.dstPts - the array into which the converted point coordinate is returned (may be
the same than srcPts). Ordinates will be (longitude,
latitude) angles in radians.dstOff - The offset of the location of the converted point that is
stored in the destination array.
- Throws:
ProjectionException - if the point can't be converted.
Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.