| org.geotools.referencing.operation.TestTransform
All known Subclasses: org.geotools.referencing.operation.transform.GeocentricTransformTest, org.geotools.referencing.operation.CoordinateOperationFactoryTest, org.geotools.referencing.operation.transform.PassthroughTransformTest,
TestTransform | abstract public class TestTransform extends TestCase (Code) | | Base class for transform test cases. This class is not a test in itself;
only subclasses will be.
version: $Id: TestTransform.java 25262 2007-04-23 21:11:16Z desruisseaux $ author: Martin Desruisseaux |
Field Summary | |
protected CRSFactory | crsFactory The default coordinate reference system factory. | protected DatumFactory | datumFactory The default datum factory. | protected MathTransformFactory | mtFactory The default math transform factory. | protected CoordinateOperationFactory | opFactory The default transformations factory. | final protected static Random | random Random numbers generator. |
Constructor Summary | |
public | TestTransform(String name) Constructs a test case with the given name. |
Method Summary | |
public static void | assertInterfaced(MathTransform transform) Verify that the specified transform implements
MathTransform1D or
MathTransform2D as needed. | public static void | assertPointsEqual(String name, double[] expected, double[] actual, double[] delta) Compare two arrays of points. | public static void | assertTransformEquals2_2(MathTransform transform, double x, double y, double ex, double ey) Transforms a two-dimensional point and compare the result with the expected value. | public static void | assertTransformEquals2_3(MathTransform transform, double x, double y, double ex, double ey, double ez) Transforms a two-dimensional point and compare the result with the expected
three-dimensional value. | public static void | assertTransformEquals3_1(MathTransform transform, double x, double y, double z, double ez) Transforms a three-dimensional point and compare the result with the expected
one-dimensional value. | public static void | assertTransformEquals3_2(MathTransform transform, double x, double y, double z, double ex, double ey) Transforms a three-dimensional point and compare the result with the expected
two-dimensional value. | public static void | assertTransformEquals3_3(MathTransform transform, double x, double y, double z, double ex, double ey, double ez) Transforms a three-dimensional point and compare the result with the expected value. | protected Hints | getHintsForTesting() Returns the hints to be used by
TestTransform.setUp in order to fetch the factories.
The default implementation returns
null . | public static boolean | isReal(double value) Returns true if the specified number is real
(neither NaN or infinite). | protected void | setUp() Setup the factories using the hints provided by
TestTransform.getHintsForTesting . |
crsFactory | protected CRSFactory crsFactory(Code) | | The default coordinate reference system factory.
|
datumFactory | protected DatumFactory datumFactory(Code) | | The default datum factory.
|
mtFactory | protected MathTransformFactory mtFactory(Code) | | The default math transform factory.
|
opFactory | protected CoordinateOperationFactory opFactory(Code) | | The default transformations factory.
|
random | final protected static Random random(Code) | | Random numbers generator.
|
TestTransform | public TestTransform(String name)(Code) | | Constructs a test case with the given name.
|
assertInterfaced | public static void assertInterfaced(MathTransform transform)(Code) | | Verify that the specified transform implements
MathTransform1D or
MathTransform2D as needed.
Parameters: transform - The transform to test. |
assertPointsEqual | public static void assertPointsEqual(String name, double[] expected, double[] actual, double[] delta)(Code) | | Compare two arrays of points.
Parameters: name - The name of the comparaison to be performed. Parameters: expected - The expected array of points. Parameters: actual - The actual array of points. Parameters: delta - The maximal difference tolerated in comparaisons for each dimension.This array length must be equal to coordinate dimension (usually 1, 2 or 3). |
assertTransformEquals2_2 | public static void assertTransformEquals2_2(MathTransform transform, double x, double y, double ex, double ey) throws TransformException(Code) | | Transforms a two-dimensional point and compare the result with the expected value.
Parameters: transform - The transform to test. Parameters: x - The x value to transform. Parameters: y - The y value to transform. Parameters: ex - The expected x value. Parameters: ey - The expected y value. |
assertTransformEquals2_3 | public static void assertTransformEquals2_3(MathTransform transform, double x, double y, double ex, double ey, double ez) throws TransformException(Code) | | Transforms a two-dimensional point and compare the result with the expected
three-dimensional value.
Parameters: transform - The transform to test. Parameters: x - The x value to transform. Parameters: y - The y value to transform. Parameters: ex - The expected x value. Parameters: ey - The expected y value. Parameters: ez - The expected z value. |
assertTransformEquals3_1 | public static void assertTransformEquals3_1(MathTransform transform, double x, double y, double z, double ez) throws TransformException(Code) | | Transforms a three-dimensional point and compare the result with the expected
one-dimensional value.
Parameters: transform - The transform to test. Parameters: x - The x value to transform. Parameters: y - The y value to transform. Parameters: z - The z value to transform. Parameters: ez - The expected z value. |
assertTransformEquals3_2 | public static void assertTransformEquals3_2(MathTransform transform, double x, double y, double z, double ex, double ey) throws TransformException(Code) | | Transforms a three-dimensional point and compare the result with the expected
two-dimensional value.
Parameters: transform - The transform to test. Parameters: x - The x value to transform. Parameters: y - The y value to transform. Parameters: z - The z value to transform. Parameters: ex - The expected x value. Parameters: ey - The expected y value. |
assertTransformEquals3_3 | public static void assertTransformEquals3_3(MathTransform transform, double x, double y, double z, double ex, double ey, double ez) throws TransformException(Code) | | Transforms a three-dimensional point and compare the result with the expected value.
Parameters: transform - The transform to test. Parameters: x - The x value to transform. Parameters: y - The y value to transform. Parameters: z - The z value to transform. Parameters: ex - The expected x value. Parameters: ey - The expected y value. Parameters: ez - The expected z value. |
getHintsForTesting | protected Hints getHintsForTesting()(Code) | | Returns the hints to be used by
TestTransform.setUp in order to fetch the factories.
The default implementation returns
null . Subclasses can override.
|
isReal | public static boolean isReal(double value)(Code) | | Returns true if the specified number is real
(neither NaN or infinite).
|
|
|