Package org.iogp.gigs

Class Test3203


@DisplayName("User-defined prime meridian") public class Test3203 extends Series3000<PrimeMeridian>
Verifies that the software allows correct definition of a user-defined prime meridian.
Test description
Test method: Create user-defined prime meridian for each of several different prime meridians.
Test data: GIGS_user_3203_PrimeMeridian.txt
Tested API: DatumFactory.createPrimeMeridian(Map, 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 Test3203 {
    public MyTest() {
        super(new MyFactories());
    }
}
Since:
1.0
  • Field Details

    • longitudeInDegrees

      public double longitudeInDegrees
      The prime meridian Greenwich longitude, in decimal degrees. This field is set by all test methods before to create and verify the PrimeMeridian instance.
    • greenwichLongitude

      public double greenwichLongitude
      The prime meridian Greenwich longitude, in unit of angularUnit. This field is set by all test methods before to create and verify the PrimeMeridian instance.
    • angularUnit

      public Unit<Angle> angularUnit
      The unit of measurement of greenwichLongitude. This field is set by all test methods before to create and verify the PrimeMeridian instance.
    • datumFactory

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

      protected final CSAuthorityFactory unitFactory
      Factory to use for sexagesimal units, or null if none. This is used only if the test needs a sexagesimal unit.
      See Also:
  • Constructor Details

    • Test3203

      public Test3203(Factories factories)
      Creates a new test using the given factories. The factories needed by this class are DatumFactory and optionally CSAuthorityFactory (for sexagesimal units). If a requested factory is null, then the tests which depend on it will be skipped.

      Authority factory usage

      The coordinate system factory is used only if the test needs a sexagesimal unit, because the standard SystemOfUnits API cannot create them. If needed, the EPSG code used is 9110.
      Parameters:
      factories - factories for creating the instances to test.
  • Method Details

    • getIdentifiedObject

      public PrimeMeridian getIdentifiedObject() throws FactoryException
      Returns the prime meridian instance to be tested. When this method is invoked for the first time, it creates the prime meridian 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<PrimeMeridian>
      Returns:
      the prime meridian instance to test.
      Throws:
      FactoryException - if an error occurred while creating the prime meridian instance.
    • GIGS_68901

      @Test @DisplayName("GIGS PM A") public void GIGS_68901() throws FactoryException
      Tests “GIGS PM A” prime meridian creation from the factory.
      • GIGS prime meridian code: 68901
      • GIGS prime meridian name: GIGS PM A
      • EPSG equivalence: 8901 – Greenwich
      • Greenwich longitude: 0 degree
      Remarks: International reference meridian as defined by IERS.
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the properties.
      See Also:
    • GIGS_68908

      @Test @DisplayName("GIGS PM D") public void GIGS_68908() throws FactoryException
      Tests “GIGS PM D” prime meridian creation from the factory.
      • GIGS prime meridian code: 68908
      • GIGS prime meridian name: GIGS PM D
      • EPSG equivalence: 8908 – Jakarta
      • Greenwich longitude: 106.482779 sexagesimal DMS (106.807719444444°)
      Remarks: 1924 determination. Supersedes 1910 value of 106 48 37.05 E of Greenwich.
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the properties.
      See Also:
    • GIGS_68903

      @Test @DisplayName("GIGS PM H") public void GIGS_68903() throws FactoryException
      Tests “GIGS PM H” prime meridian creation from the factory.
      • GIGS prime meridian code: 68903
      • GIGS prime meridian name: GIGS PM H
      • EPSG equivalence: 8903 – Paris
      • Greenwich longitude: 2.5969213 grad (2.33722917°)
      Remarks: Equivalent to 2 20 14.025.
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the properties.
      See Also:
    • GIGS_68904

      @Test @DisplayName("GIGS PM I") public void GIGS_68904() throws FactoryException
      Tests “GIGS PM I” prime meridian creation from the factory.
      • GIGS prime meridian code: 68904
      • GIGS prime meridian name: GIGS PM I
      • EPSG equivalence: 8904 – Bogota
      • Greenwich longitude: -74.04513 sexagesimal DMS (-74.08091666667°)
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the properties.
      See Also: