Class ParameterizedTransformTest


  • public class ParameterizedTransformTest
    extends TransformTestCase
    Tests parameterized math transforms from the 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 a NoSuchIdentifierException during the invocation of one of the following methods:

    then the tests is skipped. If any other kind of exception is thrown, or if 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. Implementors can modify the kind of tests being executed and the tolerance threshold in different ways:

    Usage example: in order to specify their factories and run the tests in a JUnit framework, implementors can define a subclass in their own test suite as in the example below. That example shows also how implementors 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 the MathTransform2D interface):
    import org.junit.*;
    import org.junit.runner.RunWith;
    import org.junit.runners.JUnit4;
    import org.opengis.test.referencing.ParameterizedTransformTest;
    import static org.junit.Assert.*;
    
    @RunWith(JUnit4.class)
    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:
    AffineTransformTest, AuthorityFactoryTest, TestSuite
    • Field Detail

      • parameters

        protected ParameterValueGroup parameters
        The parameters of the math transform being tested. This field is set, together with the transform field, after the execution of every testFoo() method in this class.

        If this field is non-null before a test is run, then those parameters will be used directly. This allow implementors to alter the parameters before to run the test one more time.

      • description

        protected String 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.
    • Method Detail

      • factories

        public static List<Factory[]> factories()
        Returns a default set of factories to use for running the tests. Those factories are given in arguments to the constructor when this test class is instantiated directly by JUnit (for example as a suite element), instead than subclassed by the implementor. The factories are fetched as documented in the TestCase.factories(Class[]) javadoc.
        Returns:
        the default set of arguments to be given to the ParameterizedTransformTest constructor.
      • testMercator1SP

        public void testMercator1SP()
                             throws FactoryException,
                                    TransformException
        Tests the "Mercator (variant A)" (EPSG:9804) projection method. First, this method transforms the point given in the Example section of the EPSG guidance note and compares the MathTransform 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 ordinates Expected results
        110°E
        0°N
        3900000.00 m
        900000.00 m
        120°E
        3°S
        5009726.58 m
        569150.82 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_3002()
      • testMercator2SP

        public void testMercator2SP()
                             throws FactoryException,
                                    TransformException
        Tests the "Mercator (variant B)" (EPSG:9805) projection method. First, this method transforms the point given in the Example section of the EPSG guidance note and compares the MathTransform 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 ordinates Expected results
        51°E
        0°N
        0.00 m
        0.00 m
        53°E
        53°N
        165704.29 m
        5171848.07 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_3388()
      • testMercatorVariantC

        public void testMercatorVariantC()
                                  throws FactoryException,
                                         TransformException
        Tests the "Mercator (variant C)" (EPSG:1044) projection method. First, this method transforms the point given in the Example section of the EPSG guidance note and compares the MathTransform 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 the "latitude 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 ordinates Expected results
        51°E
        42°N
        0.00 m
        0.00 m
        53°E
        53°N
        165704.29 m
        1351950.22 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
      • testMercatorSpherical

        public void testMercatorSpherical()
                                   throws FactoryException,
                                          TransformException
        Tests the "Mercator (Spherical)" (EPSG:1026) projection method. First, this method transforms the point given in the Example section of the EPSG guidance note and compares the MathTransform 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 than 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 ordinates Expected results
        0°E
        0°N
        0.00 m
        0.00 m
        100°20'00.000"W
        24°22'54.433"N
        -11156569.90 m
        2796869.94 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
      • testPseudoMercator

        public void testPseudoMercator()
                                throws FactoryException,
                                       TransformException
        Tests the "Mercator 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 the MathTransform 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 ordinates Expected results
        0°E
        0°N
        0.00 m
        0.00 m
        100°20'00.000"W
        24°22'54.433"N
        -11169055.58 m
        2800000.00 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_3857()
      • testMiller

        public void testMiller()
                        throws FactoryException,
                               TransformException
        Tests the "IGNF:MILLER" projection. First, this method transforms the point given below and compares the MathTransform 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 ordinates Expected results
        0°E
        0°N
        0.00 m
        0.00 m
        2.478917°E
        48.805639°N
        275951.78 m
        5910061.78 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testIGNF_MILLER()
      • testHotineObliqueMercator

        public void testHotineObliqueMercator()
                                       throws FactoryException,
                                              TransformException
        Tests the "Hotine 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 the MathTransform 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 ordinates Expected results
        115°E
        4°N
        590476.87 m
        442857.65 m
        115°48'19.8196"E
        5°23'14.1129"N
        679245.73 m
        596562.78 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_29873()
      • testTransverseMercator

        public void testTransverseMercator()
                                    throws FactoryException,
                                           TransformException
        Tests the "Transverse Mercator" (EPSG:9807) projection method. First, this method transforms the point given in the Example section of the EPSG guidance note and compares the MathTransform 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 ordinates Expected results
        2°W
        49°N
        400000.00 m
        -100000.00 m
        00°30'E
        50°30'N
        577274.98 m
        69740.49 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_27700()
      • testTransverseMercatorSouthOrientated

        public void testTransverseMercatorSouthOrientated()
                                                   throws FactoryException,
                                                          TransformException
        Tests 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 the MathTransform 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
        Longitude of natural origin 29°
        Scale factor at natural origin 1
        False easting 0 m
        False northing 0 m
        Test points
        Source ordinates Expected results
        20°E
        0°S
        0 m
        0 m
        28°16'57.479"E
        25°43'55.302"S
        71984.48 m
        2847342.74 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
      • testCassiniSoldner

        public void testCassiniSoldner()
                                throws FactoryException,
                                       TransformException
        Tests the "Cassini-Soldner" (EPSG:9806) projection method. First, this method transforms the point given in the Example section of the EPSG guidance note and compares the MathTransform 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 ordinates Expected results
        61°20'00"W
        10°26'30"N
        430000.00 links
        325000.00 links
        60°00'00"W
        10°00'00"N
        66644.94 links
        82536.22 links

        1 link = 0.66 feet
        1 feet = 0.3048 metre

        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_2314()
      • testLambertConicConformal1SP

        public void testLambertConicConformal1SP()
                                          throws FactoryException,
                                                 TransformException
        Tests the "Lambert 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 the MathTransform 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 ordinates Expected results
        77°W
        18°N
        250000.00 m
        150000.00 m
        76°56'37.26"W
        17°55'55.80"N
        255966.58 m
        142493.51 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_24200()
      • testLambertConicConformal2SP

        public void testLambertConicConformal2SP()
                                          throws FactoryException,
                                                 TransformException
        Tests the "Lambert 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 the MathTransform 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 ordinates Expected results
        99°00'W
        27°30'N
        2000000.00 US feet
        0 US feet
        96°00'W
        28°30'N
        2963503.91 US feet
        254759.80 US feet

        1 metre = 3.2808333… US feet

        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_32040()
      • testLambertConicConformalBelgium

        public void testLambertConicConformalBelgium()
                                              throws FactoryException,
                                                     TransformException
        Tests the "Lambert 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 the MathTransform 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 ordinates Expected results
        4°21'24.983"E
        90°00'00.000"N
        150000.01 m
        5400088.44 m
        5°48'26.533"E
        50°40'46.461"N
        251763.20 m
        153034.13 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_31300()
      • testLambertConicConformalMichigan

        public void testLambertConicConformalMichigan()
                                               throws FactoryException,
                                                      TransformException
        Tests the "Lambert 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 the MathTransform 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 ordinates Expected results
        84°20'W
        43°19'N
        2000000.00 US feet
        0 US feet
        83°10"W
        43°45'N
        2308335.75 US feet
        160210.48 US feet

        1 metre = 3.2808333… US feet

        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
      • testLambertAzimuthalEqualArea

        public void testLambertAzimuthalEqualArea()
                                           throws FactoryException,
                                                  TransformException
        Tests the "Lambert 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 the MathTransform 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 ordinates Expected results
        10°E
        52°N
        4321000.00 m
        3210000.00 m
        5°E
        50°N
        3962799.45 m
        2999718.85 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_3035()
      • testPolarStereographicA

        public void testPolarStereographicA()
                                     throws FactoryException,
                                            TransformException
        Tests the "Polar 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 the MathTransform 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 ordinates Expected results
        0°E
        90°N
        2000000.00 m
        2000000.00 m
        44°E
        73°N
        3320416.75 m
        632668.43 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_5041(), AuthorityFactoryTest.testEPSG_32661()
      • testPolarStereographicB

        public void testPolarStereographicB()
                                     throws FactoryException,
                                            TransformException
        Tests the "Polar 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 the MathTransform 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 ordinates 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 ordinates Expected results
        70°E
        90°S
        6000000.00 m
        6000000.00 m
        120°E
        75°S
        7255380.79 m
        7053389.56 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_3032()
      • testPolarStereographicC

        public void testPolarStereographicC()
                                     throws FactoryException,
                                            TransformException
        Tests the "Polar 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 the MathTransform 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 ordinates 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 ordinates Expected results
        67°E
        90°S
        300000.00 m
        200000.00 m
        140°04'17.040"E
        66°36'18.820"S
        303169.52 m
        244055.72 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_3032()
      • testObliqueStereographic

        public void testObliqueStereographic()
                                      throws FactoryException,
                                             TransformException
        Tests the "Oblique Stereographic" (EPSG:9809) projection method. First, this method transforms the point given in the Example section of the EPSG guidance note and compares the MathTransform 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 ordinates Expected results
        5°23'15.500"E
        52°09'22.178"N
        155000.000 m
        463000.000 m
        6°E
        53°N
        196105.283 m
        557057.739 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_28992()
      • testPolyconic

        public void testPolyconic()
                           throws FactoryException,
                                  TransformException
        Tests the "American 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 ordinates Expected results
        See source See source
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
      • testKrovak

        public void testKrovak()
                        throws FactoryException,
                               TransformException
        Tests the "Krovak" (EPSG:9819) projection. First, this method transforms the point given in the Example section of the EPSG guidance note and compares the MathTransform 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 ordinates Expected results
        16°50'59.179"E
        50°12'32.442"N
        -568990.997 m
        -1050538.643 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.
        See Also:
        AuthorityFactoryTest.testEPSG_2065()
      • testAbridgedMolodensky

        public void testAbridgedMolodensky()
                                    throws FactoryException,
                                           TransformException
        Tests the "Abridged Molodensky" (EPSG:9605) datum shift operation. First, this method transforms the point given in the Example section of the EPSG guidance note and compares the MathTransform 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:

        CRS 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 ordinatesExpected results
        2°7'46.380"E
        53°48'33.820"N
        73.000 m
        2°7'51.477"E
        53°48'36.563"N
        28.091 m
        Throws:
        FactoryException - if the math transform can not be created.
        TransformException - if the example point can not be transformed.