Package org.iogp.gigs

Class Test2203


@DisplayName("Prime meridian") public class Test2203 extends Series2000<PrimeMeridian>
Verifies reference prime meridians bundled with the geoscience software.
Test description
Test method: Compare prime meridian definitions included in the software against the EPSG Dataset.
Test data: GIGS_lib_2203_PrimeMeridian.txt and EPSG Dataset.
Tested API: DatumAuthorityFactory.createPrimeMeridian(String).
Expected result: Prime meridian definitions bundled with the software should have the same name and Greenwich Longitude as in the EPSG Dataset. Equivalent alternative units are acceptable but should be reported. The values of the Greenwich Longitude should be correct to at least 7 decimal places (of degrees or grads). Meridians missing from the software or at variance with those in the EPSG Dataset should be reported.

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 Test2203 {
    public MyTest() {
        super(new MyDatumAuthorityFactory());
    }
}
Since:
1.0
  • Field Details

    • greenwichLongitude

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

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

    • Test2203

      public Test2203(DatumAuthorityFactory 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 PrimeMeridian instances.
  • 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 DatumAuthorityFactory.createPrimeMeridian(String) method with the current Series2000.code value in argument. The created object is then cached and returned in all subsequent invocations of this method.
      Specified by:
      getIdentifiedObject in class Series2000<PrimeMeridian>
      Returns:
      the prime meridian instance to test.
      Throws:
      FactoryException - if an error occurred while creating the prime meridian instance.
    • EPSG_8912

      @Test @DisplayName("Athens") public void EPSG_8912() throws FactoryException
      Tests “Athens” prime meridian creation from the factory.
      • EPSG prime meridian code: 8912
      • EPSG prime meridian name: Athens
      • Greenwich longitude: 23°42′58.815″
      • Angular unit: sexagesimal DMS
      • EPSG Usage Extent: Greece
      Remarks: Used in Greece for older mapping based on Hatt projection.
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the EPSG code.
    • EPSG_8907

      @Test @DisplayName("Bern") public void EPSG_8907() throws FactoryException
      Tests “Bern” prime meridian creation from the factory.
      • EPSG prime meridian code: 8907
      • EPSG prime meridian name: Bern
      • Greenwich longitude: 7°26′22.5″
      • Angular unit: sexagesimal DMS
      • EPSG Usage Extent: Europe
      Remarks: 1895 value. Newer value of 7°26′22.335″ determined in 1938.
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the EPSG code.
    • EPSG_8904

      @Test @DisplayName("Bogota") public void EPSG_8904() throws FactoryException
      Tests “Bogota” prime meridian creation from the factory.
      • EPSG prime meridian code: 8904
      • EPSG prime meridian name: Bogota
      • Greenwich longitude: -74°04′51.3″
      • Angular unit: sexagesimal DMS
      • EPSG Usage Extent: South America
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the EPSG code.
    • EPSG_8910

      @Test @DisplayName("Brussels") public void EPSG_8910() throws FactoryException
      Tests “Brussels” prime meridian creation from the factory.
      • EPSG prime meridian code: 8910
      • EPSG prime meridian name: Brussels
      • Greenwich longitude: 4°22′04.71″
      • Angular unit: sexagesimal DMS
      • EPSG Usage Extent: Europe
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the EPSG code.
    • EPSG_8909

      @Test @DisplayName("Ferro") public void EPSG_8909() throws FactoryException
      Tests “Ferro” prime meridian creation from the factory.
      • EPSG prime meridian code: 8909
      • EPSG prime meridian name: Ferro
      • Alias(es) given by EPSG: El Hierro
      • Greenwich longitude: -17°40′
      • Angular unit: sexagesimal DMS
      • EPSG Usage Extent: Western Europe
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the EPSG code.
    • EPSG_8901

      @Test @DisplayName("Greenwich") public void EPSG_8901() throws FactoryException
      Tests “Greenwich” prime meridian creation from the factory.
      • EPSG prime meridian code: 8901
      • EPSG prime meridian name: Greenwich
      • Greenwich longitude:
      • Angular unit: degree
      • EPSG Usage Extent: Numerous
      Remarks: International reference meridian as defined by IERS.
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the EPSG code.
    • EPSG_8908

      @Test @DisplayName("Jakarta") public void EPSG_8908() throws FactoryException
      Tests “Jakarta” prime meridian creation from the factory.
      • EPSG prime meridian code: 8908
      • EPSG prime meridian name: Jakarta
      • Greenwich longitude: 106°48′27.79″
      • Angular unit: sexagesimal DMS
      • EPSG Usage Extent: Southeast Asia
      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 EPSG code.
    • EPSG_8902

      @Test @DisplayName("Lisbon") public void EPSG_8902() throws FactoryException
      Tests “Lisbon” prime meridian creation from the factory.
      • EPSG prime meridian code: 8902
      • EPSG prime meridian name: Lisbon
      • Greenwich longitude: -9°07′54.862″
      • Angular unit: sexagesimal DMS
      • EPSG Usage Extent: Europe
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the EPSG code.
    • EPSG_8905

      @Test @DisplayName("Madrid") public void EPSG_8905() throws FactoryException
      Tests “Madrid” prime meridian creation from the factory.
      • EPSG prime meridian code: 8905
      • EPSG prime meridian name: Madrid
      • Greenwich longitude: -3°41′14.55″
      • Angular unit: sexagesimal DMS
      • EPSG Usage Extent: Spain
      Remarks: Longitude has had various determinations.
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the EPSG code.
    • EPSG_8913

      @Test @DisplayName("Oslo") public void EPSG_8913() throws FactoryException
      Tests “Oslo” prime meridian creation from the factory.
      • EPSG prime meridian code: 8913
      • EPSG prime meridian name: Oslo
      • Alias(es) given by EPSG: Kristiania, Christiana
      • Greenwich longitude: 10°43′22.5″
      • Angular unit: sexagesimal DMS
      • EPSG Usage Extent: Scandinavia
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the EPSG code.
    • EPSG_8903

      @Test @DisplayName("Paris") public void EPSG_8903() throws FactoryException
      Tests “Paris” prime meridian creation from the factory.
      • EPSG prime meridian code: 8903
      • EPSG prime meridian name: Paris
      • Greenwich longitude: 2.5969213
      • Angular unit: grad
      • EPSG Usage Extent: Europe
      Remarks: Value adopted by IGN (Paris) in 1936. Equivalent to 2°20′14.025″. Preferred by EPSG to earlier value of 2 20 13.95 (2.596898 grads) used by RGS London.
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the EPSG code.
    • EPSG_8914

      @Test @DisplayName("Paris RGS") public void EPSG_8914() throws FactoryException
      Tests “Paris RGS” prime meridian creation from the factory.
      • EPSG prime meridian code: 8914
      • EPSG prime meridian name: Paris RGS
      • Greenwich longitude: 2°20′13.95″
      • Angular unit: sexagesimal DMS
      • EPSG Usage Extent: Europe
      Remarks: Equivalent to 2.596898 grads.
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the EPSG code.
    • EPSG_8906

      @Test @DisplayName("Rome") public void EPSG_8906() throws FactoryException
      Tests “Rome” prime meridian creation from the factory.
      • EPSG prime meridian code: 8906
      • EPSG prime meridian name: Rome
      • Greenwich longitude: 12°27′08.4″
      • Angular unit: sexagesimal DMS
      • EPSG Usage Extent: Europe
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the EPSG code.
    • EPSG_8911

      @Test @DisplayName("Stockholm") public void EPSG_8911() throws FactoryException
      Tests “Stockholm” prime meridian creation from the factory.
      • EPSG prime meridian code: 8911
      • EPSG prime meridian name: Stockholm
      • Greenwich longitude: 18°03′29.8″
      • Angular unit: sexagesimal DMS
      • EPSG Usage Extent: Europe
      Throws:
      FactoryException - if an error occurred while creating the prime meridian from the EPSG code.