Class ParameterizedTransformTest
org.opengis.referencing.operation
package.
Math transform instances are created using the factory given at construction time.
Skipping tests for unsupported operations
If the tested factory throws aNoSuchIdentifierException
during the invocation
of one of the following methods:
MathTransformFactory.getDefaultParameters(String)
MathTransformFactory.createParameterizedTransform(ParameterValueGroup)
NoSuchIdentifierException
is thrown under other circumstances than the invocation of above methods, then the test fails.
Tests and accuracy
By default, every tests expect an accuracy of 1 centimetre. This accuracy matches the precision of most example points given in the EPSG guidance notice. Implementers can modify the kind of tests being executed and the tolerance threshold in different ways:- Set some
is<Operation>Supported
fields tofalse
. - Override some of the
testFoo()
method and set thetolerance
field before to invokesuper.testFoo()
. - Override
normalize(DirectPosition, DirectPosition, CalculationType)
. - Override
assertMatrixEquals(Matrix, Matrix, Matrix, String)
.
Usage example
in order to specify their factories and run the tests in a JUnit framework, implementers can define a subclass in their own test suite as in the example below. That example shows also how implementers can alter some tests (here the tolerance value for the Lambert Azimuthal Equal Area projection) and add more checks to be executed after every tests (here ensuring that the transform implements theMathTransform2D
interface):
import org.junit.jupiter.api.Test;
import org.opengis.test.referencing.ParameterizedTransformTest;
import static org.junit.jupiter.api.Assertions.*;
public class MyTest extends ParameterizedTransformTest {
public MyTest() {
super(new MyMathTransformFactory());
}
@Test
@Override
public void testLambertAzimuthalEqualArea() throws FactoryException, TransformException {
tolerance = 0.1; // Increase the tolerance value to 10 cm.
super.testLambertAzimuthalEqualArea();
// If more tests specific to this projection are wanted, do them here.
// In this example, we replace the ellipsoid by a sphere and test again.
// Note that spherical formulas can have an error up to 30 km compared
// to ellipsoidal formulas, so we have to relax again the tolerance threshold.
parameters.parameter("semi_minor").setValue(parameters.parameter("semi_major").doubleValue());
tolerance = 30000; // Increase the tolerance value to 30 km.
super.testLambertAzimuthalEqualArea();
}
@After
public void ensureAllTransformAreMath2D() {
assertTrue(transform instanceof MathTransform2D);
}
}
- Since:
- 3.1
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
A description of the test being run.protected final MathTransformFactory
The factory for creatingMathTransform
objects, ornull
if none.protected ParameterValueGroup
The parameters of the math transform being tested.Fields inherited from class org.opengis.test.referencing.TransformTestCase
derivativeDeltas, isDerivativeSupported, isDoubleToDoubleSupported, isDoubleToFloatSupported, isFloatToDoubleSupported, isFloatToFloatSupported, isInverseTransformSupported, isOverlappingArraySupported, tolerance, toleranceModifier, transform
Fields inherited from class org.opengis.test.TestCase
configurationTip, units, validators
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new test using the given factory. -
Method Summary
Modifier and TypeMethodDescriptionReturns information about the configuration of the test which has been run.void
Tests theAbridged Molodensky
(EPSG:9605) datum shift operation.void
Tests theCassini-Soldner
(EPSG:9806) projection method.void
Tests theEquidistant Cylindrical
(EPSG:1028) projection.void
Tests theGeocentric/topocentric conversions
(EPSG:9836).void
Tests theGeographic/topocentric conversions
(EPSG:9837).void
Tests theHotine Oblique Mercator (variant B)
(EPSG:9815) projection method.void
Tests theHyperbolic Cassini-Soldner
(EPSG:9833) projection method.void
Tests theKrovak
(EPSG:9819) projection.void
Tests theLambert Azimuthal Equal Area
(EPSG:9820) projection method.void
Tests theLambert Conic Conformal (1SP)
(EPSG:9801) projection method.void
Tests theLambert Conic Conformal (2SP)
(EPSG:9802) projection method.void
Tests theLambert Conic Conformal (2SP Belgium)
(EPSG:9803) projection method.void
Tests theLambert Conic Conformal (2SP Michigan)
(EPSG:1051) projection method.void
Tests theMercator (variant A)
(EPSG:9804) projection method.void
Tests theMercator (variant B)
(EPSG:9805) projection method.void
Tests theMercator (Spherical)
(EPSG:1026) projection method.void
Tests theMercator (variant C)
(EPSG:1044) projection method.void
Tests theIGNF:MILLER
projection.void
Tests theModified Azimuthal Equidistant
(EPSG:9832) projection.void
Tests theOblique Stereographic
(EPSG:9809) projection method.void
Tests theOrthographic
(EPSG:9840) projection.void
Tests thePolar Stereographic (variant A)
(EPSG:9810) projection method.void
Tests thePolar Stereographic (variant B)
(EPSG:9829) projection method.void
Tests thePolar Stereographic (variant C)
(EPSG:9830) projection method.void
Tests theAmerican Polyconic
(EPSG:9818) projection.void
Tests theMercator Popular Visualisation Pseudo Mercator
(EPSG:1024) projection method.void
Tests theTransverse Mercator
(EPSG:9807) projection method.void
Tests the Transverse Mercator (South Orientated) (EPSG:9808) projection method.Methods inherited from class org.opengis.test.referencing.TransformTestCase
assertAllTestsEnabled, assertCoordinateEquals, assertCoordinateEquals, assertCoordinateEquals, assertCoordinateEquals, assertCoordinateEquals, assertCoordinateEquals, assertCoordinateEquals, assertCoordinateEquals, assertCoordinatesEqual, assertCoordinatesEqual, assertCoordinatesEqual, assertCoordinatesEqual, assertCoordinatesEqual, assertCoordinatesEqual, assertCoordinatesEqual, assertCoordinatesEqual, normalize, tolerance, verifyConsistency, verifyDerivative, verifyInDomain, verifyInverse, verifyInverse, verifyTransform
Methods inherited from class org.opengis.test.TestCase
getEnabledFlags
-
Field Details
-
mtFactory
The factory for creatingMathTransform
objects, ornull
if none. -
parameters
The parameters of the math transform being tested. This field is set, together with thetransform
field, during the execution of everytestFoo()
method in this class.If this field is non-null before a test is run, then those parameters will be used directly. This allow implementers to alter the parameters before to run the test one more time.
-
description
A description of the test being run. This field is provided only for information purpose (typically for producing logging or error messages); it is not actually used by the tests. The value can be:- The name of the target
ProjectedCRS
when the transform being tested is a map projection - The transformation name when the transform being tested is a datum shift operation.
- The name of the target
-
-
Constructor Details
-
ParameterizedTransformTest
Creates a new test using the given factory. If the given factory isnull
, then the tests will be skipped.- Parameters:
factory
- factory for creatingMathTransform
instances.
-
-
Method Details
-
configuration
Returns information about the configuration of the test which has been run. This method returns a map containing:- All the entries defined in the parent class.
- All the following values associated to the
Configuration.Key
of the same name:
- Overrides:
configuration
in classTransformTestCase
- Returns:
- the configuration of the test being run, or an empty map if none. This method returns a modifiable map in order to allow subclasses to modify it.
-
testMercator1SP
Tests theMercator (variant A)
(EPSG:9804) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6377397.155 m semi-minor axis 6356078.962818189 m Latitude of natural origin 0.0° Longitude of natural origin 110.0° Scale factor at natural origin 0.997 False easting 3900000.0 m False northing 900000.0 m Test points Source coordinates Expected results 120°E
3°S5009726.58 m
569150.82 m110°E
0°N3900000.00 m
900000.00 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testMercator2SP
Tests theMercator (variant B)
(EPSG:9805) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378245.0 m semi-minor axis 6356863.018773047 m Latitude of 1st standard parallel 42.0° Longitude of natural origin 51.0° False easting 0.0 m False northing 0.0 m Test points Source coordinates Expected results 53°E
53°N165704.29 m
5171848.07 m51°E
0°N0.00 m
0.00 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testMercatorVariantC
Tests theMercator (variant C)
(EPSG:1044) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are below. Note that this is similar to
testMercator2SP()
, except that thelatitude of false origin
parameter is set to 42°N.CRS characteristics Parameter Value semi-major axis 6378245.0 m semi-minor axis 6356863.018773047 m Latitude of 1st standard parallel 42.0° Longitude of natural origin 51.0° Latitude of false origin 42.0° Easting at false origin 0.0 m Northing at false origin 0.0 m Test points Source coordinates Expected results 53°E
53°N165704.29 m
1351950.22 m51°E
42°N0.00 m
0.00 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.
-
testMercatorSpherical
Tests theMercator (Spherical)
(EPSG:1026) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are below. Note that the sample point is the same as for
testPseudoMercator()
, but with a different result in projected coordinates.CRS characteristics Parameter Value semi-major axis 6371007.0 m semi-minor axis 6371007.0 m Longitude of natural origin 0.0° False easting 0.0 m False northing 0.0 m Test points Source coordinates Expected results 100°20'00.000"W
24°22'54.433"N-11156569.90 m
2796869.94 m0°E
0°N0.00 m
0.00 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.
-
testPseudoMercator
Tests theMercator Popular Visualisation Pseudo Mercator
(EPSG:1024) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378137.0 m semi-minor axis 6356752.314247833 m Latitude of natural origin 0.0° Longitude of natural origin 0.0° False easting 0.0 m False northing 0.0 m Test points Source coordinates Expected results 100°20'00.000"W
24°22'54.433"N-11169055.58 m
2800000.00 m0°E
0°N0.00 m
0.00 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testMiller
Tests theIGNF:MILLER
projection. First, this method transforms the point given below and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi_major 6378137.0 m semi_minor 6378137.0 m central_meridian 0.0° false_easting 0.0 m false_northing 0.0 m Test points Source coordinates Expected results 2.478917°E
48.805639°N275951.78 m
5910061.78 m0°E
0°N0.00 m
0.00 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.
-
testHotineObliqueMercator
Tests theHotine Oblique Mercator (variant B)
(EPSG:9815) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6377298.556 m semi-minor axis 6356097.550300896 m Latitude of projection centre 4.0° Longitude of projection centre 109.6855202029758° Azimuth of initial line 53.31582047222222° Angle from Rectified to Skew Grid 53.13010236111111° Scale factor on initial line 0.99984 Easting at projection centre 590476.87 m Northing at projection centre 442857.65 m Test points Source coordinates Expected results 115°48'19.8196"E
5°23'14.1129"N679245.73 m
596562.78 m115°E
4°N590476.87 m
442857.65 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testTransverseMercator
Tests theTransverse Mercator
(EPSG:9807) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6377563.396 m semi-minor axis 6356256.908909849 m Latitude of natural origin 49.0° Longitude of natural origin -2.0° Scale factor at natural origin 0.9996012717 False easting 400000.0 m False northing -100000.0 m Test points Source coordinates Expected results 00°30'E
50°30'N577274.98 m
69740.49 m2°W
49°N400000.00 m
-100000.00 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testTransverseMercatorSouthOrientated
@Test public void testTransverseMercatorSouthOrientated() throws FactoryException, TransformExceptionTests the Transverse Mercator (South Orientated) (EPSG:9808) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378137.0 m semi-minor axis 6356752.314247833 m Latitude of natural origin 0° Longitude of natural origin 29° Scale factor at natural origin 1 False easting 0 m False northing 0 m Test points Source coordinates Expected results 28°16'57.479"E
25°43'55.302"S71984.48 m
2847342.74 m20°E
0°S0 m
0 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.
-
testCassiniSoldner
Tests theCassini-Soldner
(EPSG:9806) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378350.8704 m semi-minor axis 6356675.0184 m Latitude of natural origin 10.441666666666666° Longitude of natural origin -61.33333333333333° False easting 86501.46392052001 m False northing 65379.0134283 m Test points Source coordinates Expected results 60°00'00"W
10°00'00"N66644.94 links
82536.22 links61°20'00"W
10°26'30"N430000.00 links
325000.00 links1 link = 0.66 feet
1 feet = 0.3048 metre- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testHyperbolicCassiniSoldner
Tests theHyperbolic Cassini-Soldner
(EPSG:9833) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378306.3696 m semi-minor axis 6356571.9960 m Latitude of natural origin -16.25° Longitude of natural origin 179.33333333333333° False easting 251727.9155424 m False northing 334519.9537680 m Test points Source coordinates Expected results 179°59′39.6115″E
16°50′29.2435″S1601528.90 links
1336966.01 links16°15'00"S
179°20'00"E41251331.8 links
1662888.5 links1 link = 0.66 feet
1 feet = 0.3048 metre- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testLambertConicConformal1SP
Tests theLambert Conic Conformal (1SP)
(EPSG:9801) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378206.4 m semi-minor axis 6356583.8 m Latitude of natural origin 18.0° Longitude of natural origin -77.0° Scale factor at natural origin 1.0 False easting 250000.0 m False northing 150000.0 m Test points Source coordinates Expected results 76°56'37.26"W
17°55'55.80"N255966.58 m
142493.51 m77°W
18°N250000.00 m
150000.00 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testLambertConicConformal2SP
Tests theLambert Conic Conformal (2SP)
(EPSG:9802) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378206.4 m semi-minor axis 6356583.8 m Latitude of false origin 27.833333333333333° Longitude of false origin -99.0° Latitude of 1st standard parallel 28.383333333333333° Latitude of 2nd standard parallel 30.283333333333333° Easting at false origin 609601.2192024385 m Northing at false origin 0.0 m Test points Source coordinates Expected results 96°00'W
28°30'N2963503.91 US feet
254759.80 US feet99°00'W
27°30'N2000000.00 US feet
0 US feet1 metre = 3.2808333… US feet
- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testLambertConicConformalBelgium
Tests theLambert Conic Conformal (2SP Belgium)
(EPSG:9803) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378388.0 m semi-minor axis 6356911.9461279465 m Latitude of false origin 90.0° Longitude of false origin 4.356939722222222° Latitude of 1st standard parallel 49.83333333333333° Latitude of 2nd standard parallel 51.16666666666667° Easting at false origin 150000.01256 m Northing at false origin 5400088.4378 m Test points Source coordinates Expected results 5°48'26.533"E
50°40'46.461"N251763.20 m
153034.13 m4°21'24.983"E
90°00'00.000"N150000.01 m
5400088.44 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testLambertConicConformalMichigan
Tests theLambert Conic Conformal (2SP Michigan)
(EPSG:1051) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378206.4 m semi-minor axis 6356583.8 m Latitude of false origin 43.316666666666667° Longitude of false origin -84.333333333333333° Latitude of 1st standard parallel 44.183333333333333° Latitude of 2nd standard parallel 45.7° Easting at false origin 609601.2192024385 m Northing at false origin 0.0 m Test points Source coordinates Expected results 83°10"W
43°45'N2308335.75 US feet
160210.48 US feet84°20'W
43°19'N2000000.00 US feet
0 US feet1 metre = 3.2808333… US feet
- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.
-
testLambertAzimuthalEqualArea
Tests theLambert Azimuthal Equal Area
(EPSG:9820) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378137.0 m semi-minor axis 6356752.314140284 m Latitude of natural origin 52.0° Longitude of natural origin 10.0° False easting 4321000.0 m False northing 3210000.0 m Test points Source coordinates Expected results 5°E
50°N3962799.45 m
2999718.85 m10°E
52°N4321000.00 m
3210000.00 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testPolarStereographicA
Tests thePolar Stereographic (variant A)
(EPSG:9810) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378137.0 m semi-minor axis 6356752.314247833 m Latitude of natural origin 90.0° Longitude of natural origin 0.0° Scale factor at natural origin 0.994 False easting 2000000.0 m False northing 2000000.0 m Test points Source coordinates Expected results 44°E
73°N3320416.75 m
632668.43 m0°E
90°N2000000.00 m
2000000.00 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testPolarStereographicB
Tests thePolar Stereographic (variant B)
(EPSG:9829) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value Source coordinates Expected results semi-major axis 6378137.0 m semi-minor axis 6356752.314247833 m Latitude of standard parallel -71.0° Longitude of origin 70.0° False easting 6000000.0 m False northing 6000000.0 m Test points Source coordinates Expected results 120°E
75°S7255380.79 m
7053389.56 m70°E
90°S6000000.00 m
6000000.00 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testPolarStereographicC
Tests thePolar Stereographic (variant C)
(EPSG:9830) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value Source coordinates Expected results semi-major axis 6378388.0 m semi-minor axis 6356911.9461279465 m Latitude of standard parallel -67° Longitude of origin 140° False easting 300000 m False northing 200000 m Test points Source coordinates Expected results 140°04'17.040"E
66°36'18.820"S303169.52 m
244055.72 m67°E
90°S300000.00 m
200000.00 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testObliqueStereographic
Tests theOblique Stereographic
(EPSG:9809) projection method. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6377397.155 m semi-minor axis 6356078.9626186555 m Latitude of natural origin 52.15616055555556° Longitude of natural origin 5.38763888888889° Scale factor at natural origin 0.9999079 False easting 155000.0 m False northing 463000.0 m Test points Source coordinates Expected results 6°E
53°N196105.283 m
557057.739 m5°23'15.500"E
52°09'22.178"N155000.000 m
463000.000 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testPolyconic
Tests theAmerican Polyconic
(EPSG:9818) projection. First, this method transforms the some of the points given in Table 19, p 132 of Map Projections, a working manual by John P.Snyder. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378206.4 m semi-minor axis 6356583.8 m Latitude of natural origin 0.0° Longitude of natural origin 0.0° False easting 0.0 m False northing 0.0 m Test points Source coordinates Expected results See source See source - Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.
-
testKrovak
Tests theKrovak
(EPSG:9819) projection. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6377397.155 m semi-minor axis 6356078.9626186555 m Latitude of projection centre 49.5° Longitude of origin 24.5° Co-latitude of cone axis 30.288139722222222° Latitude of pseudo standard parallel 78.5° Scale factor on pseudo standard parallel 0.9999 False easting 0.0 m False northing 0.0 m Test points Source coordinates Expected results 16°50'59.179"E
50°12'32.442"N-568990.997 m
-1050538.643 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.- See Also:
-
testOrthographic
Tests theOrthographic
(EPSG:9840) projection. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378137.0 m semi-minor axis 6356752.314247833 m Latitude of natural origin 55.0° Longitude of natural origin 5.0° False easting 0.0 m False northing 0.0 m Test points Source coordinates Expected results 2°07'46.38"E
53°48'33.82"N–189011.711 m
–128 640.567 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.
-
testEquidistantCylindrical
Tests theEquidistant Cylindrical
(EPSG:1028) projection. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378137.0 m semi-minor axis 6356752.314247833 m Latitude of natural origin 0° Longitude of natural origin 0° False easting 0 m False northing 0 m Test points Source coordinates Expected results 10°00'00.000"E
55°00'00.000"N1113194.91 m
6097230.31 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.
-
testModifiedAzimuthalEquidistant
Tests theModified Azimuthal Equidistant
(EPSG:9832) projection. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of points in the projection area of validity and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
CRS characteristics Parameter Value semi-major axis 6378206.4 m semi-minor axis 6356583.8 m Latitude of natural origin 9.546708333333333° Longitude of natural origin 138.168744444444444° False easting 40000.0 m False northing 60000.0 m Test points Source coordinates Expected results 138°11'34.908"E
9°35'47.493"N42665.90 m
65509.82 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.
-
testAbridgedMolodensky
Tests theAbridged Molodensky
(EPSG:9605) datum shift operation. First, this method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result. Next, this method transforms a random set of geographic coordinates and ensures that the inverse transform and the derivatives are coherent.The math transform parameters and the sample coordinates are:
Conversion characteristics Parameter Value dim 3 src_semi_major 6378137.0 m src_semi_minor 6356752.314247833 m X-axis translation 84.87 m Y-axis translation 96.49 m Z-axis translation 116.95 m Semi-major axis length difference 251 m Flattening difference 1.41927E-05 Test points Source coordinates Expected results 2°7'46.380"E
53°48'33.820"N
73.000 m2°7'51.477"E
53°48'36.563"N
28.091 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.
-
testGeographicTopocentric
Tests theGeographic/topocentric conversions
(EPSG:9837). This method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result.A CRS using this method is "EPSG topocentric example A" (EPSG:5819)". The math transform parameters and the sample coordinates are:
Conversion characteristics Parameter Value semi_major 6378137.0 m semi_minor 6356752.314245179 m Latitude of topocentric origin 55°00'00.000"N Longitude of topocentric origin 5°00'00.000"E Ellipsoidal height of topocentric origin 200 m Test points Source coordinates Expected results 2°07'46.38"E
53°48'33.82"N
73.0 m–189013.869 m
–128642.040 m
–4220.171 m5°00'00.000"E
55°00'00.000"N
200 m0 m
0 m
0 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.
-
testGeocentricTopocentric
Tests theGeocentric/topocentric conversions
(EPSG:9836). This method transforms the point given in the example section of the EPSG guidance note and compares theMathTransform
result with the expected result.A CRS using this method is "EPSG topocentric example B" (EPSG:5820)". The math transform parameters and the sample coordinates are:
Conversion characteristics Parameter Value semi_major 6378137.0 m semi_minor 6356752.314245179 m Geocentric X of topocentric origin 3652755.3058 m Geocentric Y of topocentric origin 319574.6799 m Geocentric Z of topocentric origin 5201547.3536 m Test points Source coordinates Expected results 3771793.968 m
140253.342 m
5124304.349 m–189013.869 m
–128642.040 m
–4220.171 m3652755.3058 m
319574.6799 m
5201547.3536 m0 m
0 m
0 m- Throws:
FactoryException
- if the math transform cannot be created.TransformException
- if the example point cannot be transformed.
-