Class GIGS2001


  • public class GIGS2001
    extends AuthorityFactoryTestCase<Unit<?>>
    Verifies reference units of measure bundled with the geoscience software.
    Test method: Compare unit definitions included in the software against the EPSG Dataset.
    Test data: GIGS_2001_libUnit.csv and EPSG Dataset. Contains EPSG code and name for the unit of measure, together with the ratio of the unit to the ISO base unit for that unit type. The test methods are separated in three blocks for linear units, angular units and scaling units.
    Tested API: CSAuthorityFactory.createUnit(String).
    Expected result: Unit of measure definitions bundled with software should have the ratio to the appropriate base unit as in the EPSG Dataset. The values of the base unit per unit should be correct to at least 10 significant figures. Units 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, 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.GIGS2001;
    
    @RunWith(JUnit4.class)
    public class MyTest extends GIGS2001 {
        public MyTest() {
            super(new MyCSAuthorityFactory());
        }
    }
    Since:
    3.1
    • Constructor Detail

      • GIGS2001

        public GIGS2001​(CSAuthorityFactory csFactory)
        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:
        csFactory - factory for creating Unit 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 GIGS2001 constructor.
      • testMetre

        public void testMetre()
                       throws FactoryException
        Tests “metre” unit creation from the factory.
        • EPSG UoM code: 9001
        • Type: Linear
        • Name of Units used in EPSG dataset: metre
        • Base units per unit: 1
        • Specific usage / Remarks: Numerous
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testKilometre

        public void testKilometre()
                           throws FactoryException
        Tests “kilometre” unit creation from the factory.
        • EPSG UoM code: 9036
        • Type: Linear
        • Name of Units used in EPSG dataset: kilometre
        • Base units per unit: 1000
        • Specific usage / Remarks: Tunisia
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testFoot

        public void testFoot()
                      throws FactoryException
        Tests “foot” unit creation from the factory.
        • EPSG UoM code: 9002
        • Type: Linear
        • Name of Units used in EPSG dataset: foot
        • Base units per unit: 0.3048
        • Specific usage / Remarks: US
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testUSSurveyFoot

        public void testUSSurveyFoot()
                              throws FactoryException
        Tests “US survey foot” unit creation from the factory.
        • EPSG UoM code: 9003
        • Type: Linear
        • Name of Units used in EPSG dataset: US survey foot
        • Base units per unit: 0.30480060960121924
        • Specific usage / Remarks: US
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testGermanLegalMetre

        public void testGermanLegalMetre()
                                  throws FactoryException
        Tests “German legal metre” unit creation from the factory.
        • EPSG UoM code: 9031
        • Type: Linear
        • Name of Units used in EPSG dataset: German legal metre
        • Base units per unit: 1.0000135965
        • Specific usage / Remarks: Namibia
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testClarkeFoot

        public void testClarkeFoot()
                            throws FactoryException
        Tests “Clarke's foot” unit creation from the factory.
        • EPSG UoM code: 9005
        • Type: Linear
        • Name of Units used in EPSG dataset: Clarke's foot
        • Base units per unit: 0.3047972654
        • Specific usage / Remarks: Trinidad
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testClarkeLink

        public void testClarkeLink()
                            throws FactoryException
        Tests “Clarke's link” unit creation from the factory.
        • EPSG UoM code: 9039
        • Type: Linear
        • Name of Units used in EPSG dataset: Clarke's link
        • Base units per unit: 0.201166195164
        • Specific usage / Remarks: Trinidad
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testBritishChain

        public void testBritishChain()
                              throws FactoryException
        Tests “British chain (Sears 1922)” unit creation from the factory.
        • EPSG UoM code: 9042
        • Type: Linear
        • Name of Units used in EPSG dataset: British chain (Sears 1922)
        • Base units per unit: 20.116765121552632
        • Specific usage / Remarks: Brunei Malaysia
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
        See Also:
        testBritishChainTruncated()
      • testBritishFoot

        public void testBritishFoot()
                             throws FactoryException
        Tests “British foot (Sears 1922)” unit creation from the factory.
        • EPSG UoM code: 9051
        • Type: Linear
        • Name of Units used in EPSG dataset: British foot (Sears 1922)
        • Base units per unit: 0.3047997333333333
        • Specific usage / Remarks: Brunei Malaysia
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testBritishYard

        public void testBritishYard()
                             throws FactoryException
        Tests “British yard (Sears 1922)” unit creation from the factory.
        • EPSG UoM code: 9040
        • Type: Linear
        • Name of Units used in EPSG dataset: British yard (Sears 1922)
        • Base units per unit: 0.9143984146160287
        • Specific usage / Remarks: New Zealand
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testBritishChainTruncated

        public void testBritishChainTruncated()
                                       throws FactoryException
        Tests “British chain (Sears 1922 truncated)” unit creation from the factory.
        • EPSG UoM code: 9301
        • Type: Linear
        • Name of Units used in EPSG dataset: British chain (Sears 1922 truncated)
        • Base units per unit: 20.116756
        • Specific usage / Remarks: Malaysia
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
        See Also:
        testBritishChain()
      • testIndianYard

        public void testIndianYard()
                            throws FactoryException
        Tests “Indian yard” unit creation from the factory.
        • EPSG UoM code: 9084
        • Type: Linear
        • Name of Units used in EPSG dataset: Indian yard
        • Base units per unit: 0.9143985307444408
        • Specific usage / Remarks: south Asia - historic
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testGoldCoastFoot

        public void testGoldCoastFoot()
                               throws FactoryException
        Tests “Gold Coast foot” unit creation from the factory.
        • EPSG UoM code: 9094
        • Type: Linear
        • Name of Units used in EPSG dataset: Gold Coast foot
        • Base units per unit: 0.3047997101815088
        • Specific usage / Remarks: Ghana
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testLink

        public void testLink()
                      throws FactoryException
        Tests “link” unit creation from the factory.
        • EPSG UoM code: 9098
        • Type: Linear
        • Name of Units used in EPSG dataset: link
        • Base units per unit: 0.201168
        • Specific usage / Remarks: Fiji
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testRadian

        public void testRadian()
                        throws FactoryException
        Tests “radian” unit creation from the factory.
        • EPSG UoM code: 9101
        • Type: Angle
        • Name of Units used in EPSG dataset: radian
        • Base units per unit: 1.0
        • Specific usage / Remarks: Some geocentric 7- and 10-parameter transformations for Colombia and US/Canada.
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testDegree

        public void testDegree()
                        throws FactoryException
        Tests “degree” unit creation from the factory.
        • EPSG UoM code: 9102
        • Type: Angle
        • Name of Units used in EPSG dataset: degree
        • Base units per unit: 0.017453292519943278
        • Specific usage / Remarks: Numerous
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testArcSecond

        public void testArcSecond()
                           throws FactoryException
        Tests “arc-second” unit creation from the factory.
        • EPSG UoM code: 9104
        • Type: Angle
        • Name of Units used in EPSG dataset: arc-second
        • Base units per unit: 4.848136811095355E-6
        • Specific usage / Remarks: Numerous
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testGrad

        public void testGrad()
                      throws FactoryException
        Tests “grad” unit creation from the factory.
        • EPSG UoM code: 9105
        • Type: Angle
        • Name of Units used in EPSG dataset: grad
        • Base units per unit: 0.01570796326794895
        • Specific usage / Remarks: France
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testMicroRadian

        public void testMicroRadian()
                             throws FactoryException
        Tests “microradian” unit creation from the factory.
        • EPSG UoM code: 9109
        • Type: Angle
        • Name of Units used in EPSG dataset: microradian
        • Base units per unit: 1E-6
        • Specific usage / Remarks: Some 7- and 10-parameter transformations for Netherlands and Norway.
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testSexagesimalDegree

        public void testSexagesimalDegree()
                                   throws FactoryException
        Tests “sexagesimal DMS” unit creation from the factory.
        • EPSG UoM code: 9110
        • Type: Angle
        • Name of Units used in EPSG dataset: sexagesimal DMS
        • Base units per unit: not a constant
        • Specific usage / Remarks: Special EPSG construct for storing sexagesimal degree values as a single real number. Applications do not necessarily have to adopt this approach but should somehow exactly honour sexagesimal value. Sexagesimal degree (123º45'67.8"[H]) should be used for display at human interface.
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testCentesimalSecond

        public void testCentesimalSecond()
                                  throws FactoryException
        Tests “centesimal second” unit creation from the factory.
        • EPSG UoM code: 9113
        • Type: Angle
        • Name of Units used in EPSG dataset: centesimal second
        • Base units per unit: 1.570796326794895E-6
        • Specific usage / Remarks: Used in one geocentric 7-parameter transformation for Switzerland.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testUnity

        public void testUnity()
                       throws FactoryException
        Tests “unity” unit creation from the factory.
        • EPSG UoM code: 9201
        • Type: Scale
        • Name of Units used in EPSG dataset: unity
        • Base units per unit: 1.0
        • Specific usage / Remarks: Numerous
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testPartsPerMillion

        public void testPartsPerMillion()
                                 throws FactoryException
        Tests “parts per million” unit creation from the factory.
        • EPSG UoM code: 9202
        • Type: Scale
        • Name of Units used in EPSG dataset: parts per million
        • Base units per unit: 1E-6
        • Specific usage / Remarks: Numerous
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.
      • testCoefficient

        public void testCoefficient()
                             throws FactoryException
        Tests “coefficient” unit creation from the factory.
        • EPSG UoM code: 9203
        • Type: Scale
        • Name of Units used in EPSG dataset: coefficient
        • Base units per unit: 1.0
        • Specific usage / Remarks: Numerous
        • Particularly important to E&P industry.
        Throws:
        FactoryException - if an error occurred while creating the unit from the EPSG code.