Class GIGS3002


  • public class GIGS3002
    extends UserObjectFactoryTestCase<Ellipsoid>
    Verifies that the software allows correct definition of a user-defined ellipsoid.
    Test method: Create user-defined ellipsoid for each of several different ellipsoids.
    Test data: GIGS_3002_userEllipsoid.csv.
    Tested API: DatumFactory.createEllipsoid(Map, double, double, Unit) and
    DatumFactory.createFlattenedSphere(Map, double, double, Unit).
    Expected result: The software should accept the test data. The properties of the created objects will be compared with the properties given to the factory method.
    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:
    import org.junit.runner.RunWith;
    import org.junit.runners.JUnit4;
    import org.opengis.test.referencing.gigs.GIGS3002;
    
    @RunWith(JUnit4.class)
    public class MyTest extends GIGS3002 {
        public MyTest() {
            super(new MyDatumFactory());
        }
    }
    Since:
    3.1
    • Constructor Detail

      • GIGS3002

        public GIGS3002​(DatumFactory datumFactory)
        Creates a new test using the given factory. If a given factory is null, then the tests which depend on it will be skipped.
        Parameters:
        datumFactory - factory for creating Ellipsoid instances.
    • 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 GIGS3002 constructor.
      • testWGS84

        public void testWGS84()
                       throws FactoryException
        Tests “GIGS ellipsoid A” flattened sphere creation from the factory.
        • GIGS ellipsoid code: 67030
        • GIGS ellipsoid name: GIGS ellipsoid A
        • EPSG equivalence: 7030 – WGS 84
        • Semi-major axis (a): 6378137.0 metres
        • Semi-minor axis (b): 6356752.314247833 metres
        • Inverse flattening (1/f): 298.2572236
        • Specific usage / Remarks: Defined using a and 1/f
        Throws:
        FactoryException - if an error occurred while creating the ellipsoid from the properties.
        See Also:
        GIGS2002.testWGS84()
      • testAiry

        public void testAiry()
                      throws FactoryException
        Tests “GIGS ellipsoid B” flattened sphere creation from the factory.
        • GIGS ellipsoid code: 67001
        • GIGS ellipsoid name: GIGS ellipsoid B
        • EPSG equivalence: 7001 – Airy 1830
        • Semi-major axis (a): 6377563.396 metres
        • Semi-minor axis (b): 6356256.909237285 metres
        • Inverse flattening (1/f): 299.3249646
        • Specific usage / Remarks: Defined using a and 1/f
        Throws:
        FactoryException - if an error occurred while creating the ellipsoid from the properties.
        See Also:
        GIGS2002.testAiry()
      • testBessel

        public void testBessel()
                        throws FactoryException
        Tests “GIGS ellipsoid C” flattened sphere creation from the factory.
        • GIGS ellipsoid code: 67004
        • GIGS ellipsoid name: GIGS ellipsoid C
        • EPSG equivalence: 7004 – Bessel 1841
        • Semi-major axis (a): 6377397.155 metres
        • Semi-minor axis (b): 6356078.962818189 metres
        • Inverse flattening (1/f): 299.1528128
        • Specific usage / Remarks: Defined using a and 1/f
        Throws:
        FactoryException - if an error occurred while creating the ellipsoid from the properties.
        See Also:
        GIGS2002.testBessel()
      • testInternational1924

        public void testInternational1924()
                                   throws FactoryException
        Tests “GIGS ellipsoid E” flattened sphere creation from the factory.
        • GIGS ellipsoid code: 67022
        • GIGS ellipsoid name: GIGS ellipsoid E
        • EPSG equivalence: 7022 – International 1924
        • Semi-major axis (a): 6378388.0 metres
        • Semi-minor axis (b): 6356911.9461279465 metres
        • Inverse flattening (1/f): 297
        • Specific usage / Remarks: Defined using a and 1/f
        Throws:
        FactoryException - if an error occurred while creating the ellipsoid from the properties.
        See Also:
        GIGS2002.testInternational1924()
      • testGRS1980

        public void testGRS1980()
                         throws FactoryException
        Tests “GIGS ellipsoid F” flattened sphere creation from the factory.
        • GIGS ellipsoid code: 67019
        • GIGS ellipsoid name: GIGS ellipsoid F
        • EPSG equivalence: 7019 – GRS 1980
        • Semi-major axis (a): 6378.137 kilometres (6378137.0 metres)
        • Semi-minor axis (b): 6356.7523141402835 kilometres (6356752.3141402835 metres)
        • Inverse flattening (1/f): 298.2572221
        • Specific usage / Remarks: not metres
        Throws:
        FactoryException - if an error occurred while creating the ellipsoid from the properties.
        See Also:
        GIGS2002.testGRS1980()
      • testClarkeIGN

        public void testClarkeIGN()
                           throws FactoryException
        Tests “GIGS ellipsoid H” ellipsoid creation from the factory.
        • GIGS ellipsoid code: 67011
        • GIGS ellipsoid name: GIGS ellipsoid H
        • EPSG equivalence: 7011 – Clarke 1880 (IGN)
        • Semi-major axis (a): 6378249.2 metres
        • Semi-minor axis (b): 6356515.0 metres
        • Inverse flattening (1/f): 293.4660212936269
        • Specific usage / Remarks: Defined using a and b. Calculated 1/f = 293.4660213
        Throws:
        FactoryException - if an error occurred while creating the ellipsoid from the properties.
        See Also:
        GIGS2002.testClarkeIGN()
      • testClarkeAuthalicSphere

        public void testClarkeAuthalicSphere()
                                      throws FactoryException
        Tests “GIGS ellipsoid I” sphere creation from the factory.
        • GIGS ellipsoid code: 67052
        • GIGS ellipsoid name: GIGS ellipsoid I
        • EPSG equivalence: 7052 – Clarke 1866 Authalic Sphere
        • Semi-major axis (a): 6370997.0 metres
        • Semi-minor axis (b): 6370997.0 metres
        • Inverse flattening (1/f): Infinity
        • Specific usage / Remarks: Sphere
        Throws:
        FactoryException - if an error occurred while creating the ellipsoid from the properties.
        See Also:
        GIGS2002.testClarkeAuthalicSphere()
      • testClarke1866

        public void testClarke1866()
                            throws FactoryException
        Tests “GIGS ellipsoid J” flattened sphere creation from the factory.
        • GIGS ellipsoid code: 67008
        • GIGS ellipsoid name: GIGS ellipsoid J
        • EPSG equivalence: 7008 – Clarke 1866
        • Semi-major axis (a): 20925832.16 US survey foot (6378206.4 metres)
        • Semi-minor axis (b): 20854892.013176885 US survey foot (6356583.807100443 metres)
        • Inverse flattening (1/f): 294.9786982
        • Specific usage / Remarks: not metres
        Throws:
        FactoryException - if an error occurred while creating the ellipsoid from the properties.
        See Also:
        GIGS2002.testClarke1866()
      • testGRS1967

        public void testGRS1967()
                         throws FactoryException
        Tests “GIGS ellipsoid K” flattened sphere creation from the factory.
        • GIGS ellipsoid code: 67036
        • GIGS ellipsoid name: GIGS ellipsoid K
        • EPSG equivalence: 7036 – GRS 1967
        • Semi-major axis (a): 6378160.0 metres
        • Semi-minor axis (b): 6356774.516088779 metres
        • Inverse flattening (1/f): 298.2471674
        • Specific usage / Remarks: Defined using a and 1/f
        Throws:
        FactoryException - if an error occurred while creating the ellipsoid from the properties.
        See Also:
        GIGS2002.testGRS1967()
      • testAustralianNationalSpheroid

        public void testAustralianNationalSpheroid()
                                            throws FactoryException
        Tests “GIGS ellipsoid X” flattened sphere creation from the factory.
        • GIGS ellipsoid code: 67003
        • GIGS ellipsoid name: GIGS ellipsoid X
        • EPSG equivalence: 7003 – Australian National Spheroid
        • Semi-major axis (a): 6378160.0 metres
        • Semi-minor axis (b): 6356774.719195306 metres
        • Inverse flattening (1/f): 298.25
        • Specific usage / Remarks: Defined using a and 1/f
        Throws:
        FactoryException - if an error occurred while creating the ellipsoid from the properties.
        See Also:
        GIGS2002.testAustralianNationalSpheroid()
      • testKrassowsky

        public void testKrassowsky()
                            throws FactoryException
        Tests “GIGS ellipsoid Y” flattened sphere creation from the factory.
        • GIGS ellipsoid code: 67024
        • GIGS ellipsoid name: GIGS ellipsoid Y
        • EPSG equivalence: 7024 – Krassowsky 1940
        • Semi-major axis (a): 6378245.0 metres
        • Semi-minor axis (b): 6356863.018773047 metres
        • Inverse flattening (1/f): 298.3
        • Specific usage / Remarks: Defined using a and 1/f
        Throws:
        FactoryException - if an error occurred while creating the ellipsoid from the properties.
        See Also:
        GIGS2002.testKrassowsky()