Package org.iogp.gigs

Class Test3211


@DisplayName("User-defined vertical transformations") public class Test3211 extends Series3000<Transformation>
Verifies that the software allows correct definition of a user-defined vertical transformations.
Test description
Test method: Create user-defined vertical transformation.
Test data: GIGS_user_3211_VertTfm.txt
Tested API: MathTransformFactory.getDefaultParameters(String) and
CoordinateOperationFactory.createTransformation(Map, CoordinateReferenceSystem, CoordinateReferenceSystem, OperationMethod, MathTransform).
Expected result: The geoscience software should accept the test data. The order in which the transformation parameters are entered is not critical, although that given in the test dataset is recommended.

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

    • methodName

      public String methodName
      Name of the transformation method.
    • parameters

      public Parameter[] parameters
      The parameters defining the transformation to create. This field is set by all test methods before to create and verify the Transformation instance.
    • mtFactory

      protected final MathTransformFactory mtFactory
      The factory to use for fetching operation methods, or null if none.
    • copFactory

      protected final CoordinateOperationFactory copFactory
      The factory used to create DefaultTransformation, or null if none. This factory only works for Apache SIS
    • crsFactory

      protected final CRSFactory crsFactory
      Factory to use for building GeodeticCRS instances, or null if none.
    • datumFactory

      protected final DatumFactory datumFactory
      Factory to use for building GeodeticDatum instances, or null if none. May also be used for building Ellipsoid and PrimeMeridian components.
    • crsAuthorityFactory

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

    • Test3211

      public Test3211(Factories factories)
      Creates a new test using the given factories. The factories needed by this class are CoordinateOperationFactory, MathTransformFactory, CRSFactory, CSFactory, DatumFactory and optionally CRSAuthorityFactory. If a requested factory is null, then the tests which depend on it will be skipped.

      Authority factory usage

      The authority factory is used only for some test cases where the components are fetched by EPSG codes instead of being built by user. Those test cases are identified by the "definition source" line in Javadoc.
      Parameters:
      factories - factories for creating the instances to test.
  • Method Details

    • getIdentifiedObject

      public Transformation getIdentifiedObject() throws FactoryException
      Returns the vertical transformation instance to be tested. When this method is invoked for the first time, it creates the transformation to test by invoking the MathTransformFactory.getDefaultParameters(String) method with the current methodName value in argument and then specifying the parameters by invoking MathTransformFactory.createParameterizedTransform(ParameterValueGroup). In order to create a transformation that is created from CRS and parameters, an implementation-specific API needs to be called. Details of the implementation-specific part are internal to GIGS test suite and will tentatively be removed with GeoAPI 3.1. The created object is then cached and returned in all subsequent invocations of this method.
      Specified by:
      getIdentifiedObject in class Series3000<Transformation>
      Returns:
      the transformation instance to test.
      Throws:
      FactoryException - if an error occurred while creating the transformation instance.
    • GIGS_61503

      @Test @DisplayName("GIGS vertCRS U1 height to GIGS vertCRS V1 height") public void GIGS_61503() throws FactoryException
      Tests “GIGS vertCRS U1 height to GIGS vertCRS V1 height” transformation from the factory.
      • GIGS transformation code: 61503
      • EPSG Transformation Method: Vertical Offset and Slope
      Transformation parameters
      Parameter nameValue
      Ordinate 1 of evaluation point52°
      Ordinate 2 of evaluation point
      Vertical offset-0.486 metre
      Inclination in latitude-0.003 arc-second
      Inclination in longitude0.006 arc-second
      Remarks: No direct EPSG equivalent. Extracted subset of 1503 NAD83 to NAD83(HARN) (30).
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_65440

      @Test @DisplayName("GIGS vertCRS V1 depth to GIGS vertCRS W1 depth") public void GIGS_65440() throws FactoryException
      Tests “GIGS vertCRS V1 depth to GIGS vertCRS W1 depth” transformation from the factory.
      • GIGS transformation code: 65440
      • EPSG Transformation Method: Vertical offset
      • EPSG equivalence: 5440 – Baltic 1977 depth to Caspian depth (1)
      Transformation parameters
      Parameter nameValue
      Vertical offset-28 metres
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_65441

      @Test @DisplayName("GIGS vertCRS V1 depth to GIGS vertCRS W1 height") public void GIGS_65441() throws FactoryException
      Tests “GIGS vertCRS V1 depth to GIGS vertCRS W1 height” transformation from the factory.
      • GIGS transformation code: 65441
      • EPSG Transformation Method: Vertical offset
      Transformation parameters
      Parameter nameValue
      Vertical offset28 metres
      Remarks: EPSG equivalent deprecated but remains relevant. Previous equivalent 5441 Baltic depth to Caspian height (1).
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61502

      @Test @DisplayName("GIGS vertCRS V1 depth to MSL depth") public void GIGS_61502() throws FactoryException
      Tests “GIGS vertCRS V1 depth to MSL depth” transformation from the factory.
      • GIGS transformation code: 61502
      • EPSG Transformation Method: Vertical offset
      Transformation parameters
      Parameter nameValue
      Vertical offset0 metre
      Remarks: No direct EPSG equivalent.
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_65447

      @Test @DisplayName("GIGS vertCRS V1 height to GIGS vertCRS U1 height") public void GIGS_65447() throws FactoryException
      Tests “GIGS vertCRS V1 height to GIGS vertCRS U1 height” transformation from the factory.
      • GIGS transformation code: 65447
      • EPSG Transformation Method: Vertical offset
      • EPSG equivalence: 5447 – Baltic 1977 height to Black Sea height (1)
      Transformation parameters
      Parameter nameValue
      Vertical offset0.4 metre
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_65400

      @Test @DisplayName("GIGS vertCRS V1 height to GIGS vertCRS W1 depth") public void GIGS_65400() throws FactoryException
      Tests “GIGS vertCRS V1 height to GIGS vertCRS W1 depth” transformation from the factory.
      • GIGS transformation code: 65400
      • EPSG Transformation Method: Vertical offset
      Transformation parameters
      Parameter nameValue
      Vertical offset-28 metres
      Remarks: EPSG equivalent deprecated but remains relevant. Previous equivalent 5400 Baltic height to Caspian depth (1).
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_65438

      @Test @DisplayName("GIGS vertCRS V1 height to GIGS vertCRS W1 height") public void GIGS_65438() throws FactoryException
      Tests “GIGS vertCRS V1 height to GIGS vertCRS W1 height” transformation from the factory.
      • GIGS transformation code: 65438
      • EPSG Transformation Method: Vertical offset
      • EPSG equivalence: 5438 – Baltic 1977 height to Caspian height (1)
      Transformation parameters
      Parameter nameValue
      Vertical offset28 metres
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61501

      @Test @DisplayName("GIGS vertCRS V1 height to MSL height") public void GIGS_61501() throws FactoryException
      Tests “GIGS vertCRS V1 height to MSL height” transformation from the factory.
      • GIGS transformation code: 61501
      • EPSG Transformation Method: Vertical offset
      Transformation parameters
      Parameter nameValue
      Vertical offset0 metre
      Remarks: No direct EPSG equivalent.
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.