Package org.iogp.gigs

Class Test3202


@DisplayName("User-defined ellipsoid") public class Test3202 extends Series3000<Ellipsoid>
Verifies that the software allows correct definition of a user-defined ellipsoid.
Test description
Test method: Create user-defined ellipsoid for each of several different ellipsoids.
Test data: GIGS_user_3202_Ellipsoid.txt
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, implementers can define a subclass in their own test suite as in the example below:
public class MyTest extends Test3202 {
    public MyTest() {
        super(new MyDatumFactory());
    }
}
Since:
1.0
  • Field Details

    • semiMajorInMetres

      public double semiMajorInMetres
      The ellipsoid semi-major axis length, in metres. This field is set by all test methods before to create and verify the Ellipsoid instance.
    • semiMajorAxis

      public double semiMajorAxis
      The ellipsoid semi-major axis length, in unit of axisUnit. This field is set by all test methods before to create and verify the Ellipsoid instance.
    • semiMinorAxis

      public double semiMinorAxis
      The ellipsoid semi-minor axis length, in unit of axisUnit. This field is set by all test methods before to create and verify the Ellipsoid instance.
    • axisUnit

      public Unit<Length> axisUnit
      The semiMajorAxis and semiMinorAxis unit of measurement. This field is set by all test methods before to create and verify the Ellipsoid instance.
    • inverseFlattening

      public double inverseFlattening
      The inverse flattening factor (dimensionless), or Double.POSITIVE_INFINITY if the ellipsoid is a sphere. This field is set by all test methods before to create and verify the Ellipsoid instance.
    • isIvfDefinitive

      public boolean isIvfDefinitive
      false if the second defining parameter is the semiMinorAxis length, or true if it is the inverseFlattening. This field is set by all test methods before to create and verify the Ellipsoid instance.
    • isSphere

      public boolean isSphere
      true if the ellipsoid is a sphere. In such case, semiMinorAxis = semiMajorAxis and inverseFlattening is infinite. This field is set by all test methods before to create and verify the Ellipsoid instance.
    • datumFactory

      protected final DatumFactory datumFactory
      Factory to use for building Ellipsoid instances, or null if none. This is the factory used by the getIdentifiedObject() method.
  • Constructor Details

    • Test3202

      public Test3202(DatumFactory datumFactory)
      Creates a new test using the given factory. If the given factory is null, then the tests will be skipped.
      Parameters:
      datumFactory - factory for creating Ellipsoid instances.
  • Method Details

    • getIdentifiedObject

      public Ellipsoid getIdentifiedObject() throws FactoryException
      Returns the ellipsoid instance to be tested. When this method is invoked for the first time, it creates the ellipsoid to test by invoking the corresponding method from DatumFactory with the current properties map in argument. The created object is then cached and returned in all subsequent invocations of this method.
      Specified by:
      getIdentifiedObject in class Series3000<Ellipsoid>
      Returns:
      the ellipsoid instance to test.
      Throws:
      FactoryException - if an error occurred while creating the ellipsoid instance.
    • GIGS_67030

      @Test @DisplayName("GIGS ellipsoid A") public void GIGS_67030() 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 metre
      • Semi-minor axis (b): 6356752.3 metre
      • Inverse flattening (1/f): 298.257223563
      Remarks: Defined using a and 1/f.
      Throws:
      FactoryException - if an error occurred while creating the ellipsoid from the properties.
      See Also:
    • GIGS_67001

      @Test @DisplayName("GIGS ellipsoid B") public void GIGS_67001() 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 metre
      • Semi-minor axis (b): 6356256.909 metre
      • Inverse flattening (1/f): 299.3249646
      Remarks: Defined using a and 1/f.
      Throws:
      FactoryException - if an error occurred while creating the ellipsoid from the properties.
      See Also:
    • GIGS_67004

      @Test @DisplayName("GIGS ellipsoid C") public void GIGS_67004() 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 metre
      • Semi-minor axis (b): 6356078.963 metre
      • Inverse flattening (1/f): 299.1528128
      Remarks: Defined using a and 1/f.
      Throws:
      FactoryException - if an error occurred while creating the ellipsoid from the properties.
      See Also:
    • GIGS_67022

      @Test @DisplayName("GIGS ellipsoid E") public void GIGS_67022() 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 metre
      • Semi-minor axis (b): 6356911.9 metre
      • Inverse flattening (1/f): 297
      Remarks: Defined using a and 1/f.
      Throws:
      FactoryException - if an error occurred while creating the ellipsoid from the properties.
      See Also:
    • GIGS_67019

      @Test @DisplayName("GIGS ellipsoid F") public void GIGS_67019() 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 kilometre (6378137.0 metres)
      • Semi-minor axis (b): 6356.752 kilometre (6356752.0 metres)
      • Inverse flattening (1/f): 298.257222101
      Remarks: CAUTION defined in kilometre. Not metre as per EPSG entity.
      Throws:
      FactoryException - if an error occurred while creating the ellipsoid from the properties.
      See Also:
    • GIGS_67011

      @Test @DisplayName("GIGS ellipsoid H") public void GIGS_67011() 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 metre
      • Semi-minor axis (b): 6356515.0 metre
      • Inverse flattening (1/f): 293.466
      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:
    • GIGS_67052

      @Test @DisplayName("GIGS ellipsoid I") public void GIGS_67052() 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 metre
      • Semi-minor axis (b): 6370997.0 metre
      • Inverse flattening (1/f): Infinity
      Remarks: Sphere.
      Throws:
      FactoryException - if an error occurred while creating the ellipsoid from the properties.
      See Also:
    • GIGS_67008

      @Test @DisplayName("GIGS ellipsoid J") public void GIGS_67008() 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.164 US survey foot (6378206.4 metres)
      • Semi-minor axis (b): 20854892.017 US survey foot (6356583.8 metres)
      • Inverse flattening (1/f): 294.978698214
      Remarks: Not metres.
      Throws:
      FactoryException - if an error occurred while creating the ellipsoid from the properties.
      See Also:
    • GIGS_67036

      @Test @DisplayName("GIGS ellipsoid K") public void GIGS_67036() 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 metre
      • Semi-minor axis (b): 6356774.5 metre
      • Inverse flattening (1/f): 298.247167427
      Remarks: Defined using a and 1/f.
      Throws:
      FactoryException - if an error occurred while creating the ellipsoid from the properties.
      See Also:
    • GIGS_67003

      @Test @DisplayName("GIGS ellipsoid X") public void GIGS_67003() 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 metre
      • Semi-minor axis (b): 6356774.7 metre
      • Inverse flattening (1/f): 298.25
      Remarks: Defined using a and 1/f.
      Throws:
      FactoryException - if an error occurred while creating the ellipsoid from the properties.
      See Also:
    • GIGS_67024

      @Test @DisplayName("GIGS ellipsoid Y") public void GIGS_67024() 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 metre
      • Semi-minor axis (b): 6356863.0 metre
      • Inverse flattening (1/f): 298.3
      Remarks: Defined using a and 1/f.
      Throws:
      FactoryException - if an error occurred while creating the ellipsoid from the properties.
      See Also: