Package org.iogp.gigs

Class Test3208


@DisplayName("User-defined coordinate transformations") public class Test3208 extends Series3000<Transformation>
Verifies that the software allows correct definition of a user-defined transformations.
Test description
Test method: Create user-defined transformations.
Test data: GIGS_user_3208_CoordTfm.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 Test3208 {
    public MyTest() {
        super(new MyFactories());
    }
}
Since:
1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The factory to use for creating transformation instances, or null if none.
    protected final CRSAuthorityFactory
    Factory to use for building ProjectedCRS instances, or null if none.
    protected final CRSFactory
    Factory to use for building GeodeticCRS instances, or null if none.
    protected final DatumAuthorityFactory
    Factory to use for building GeodeticDatum and PrimeMeridian components, or null if none.
    protected final DatumFactory
    Factory to use for building GeodeticDatum instances, or null if none.
    Name of the transformation method.
    protected final MathTransformFactory
    The factory to use for fetching operation methods, or null if none.
    The parameters defining the transformation to create.

    Fields inherited from class Series3000

    isFactoryPreservingUserValues, properties
  • Constructor Summary

    Constructors
    Constructor
    Description
    Test3208(Factories factories)
    Creates a new test using the given factories.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the transformation instance to be tested.
    void
    Tests “GIGS geogCRS X to GIGS geogCRS A (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS E to GIGS geogCRS A (2)” transformation from the factory.
    void
    Tests “GIGS geogCRS C to GIGS geogCRS A (2)” transformation from the factory.
    void
    Tests “GIGS geogCRS A to WGS 84 (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS C to GIGS geogCRS A (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS C to GIGS geogCRS A (3)” transformation from the factory.
    void
    Tests “GIGS geogCRS J to GIGS geogCRS A (2)” transformation from the factory.
    void
    Tests “GIGS geogCRS L to GIGS geogCRS A (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS F to GIGS geogCRS A (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS J to GIGS geogCRS A (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS Z to GIGS geogCRS A (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS T to GIGS geogCRS A (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS B to GIGS geogCRS A (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS K to GIGS geogCRS A (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS Y to GIGS geogCRS A (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS M to GIGS geogCRS A (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS B to GIGS geogCRS A (2)” transformation from the factory.
    void
    Tests “GIGS geogCRS E to GIGS geogCRS A (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS J to GIGS geogCRS A (3)” transformation from the factory.
    void
    Tests “GIGS geogCRS D to GIGS geogCRS L (1)” transformation from the factory.
    void
    Tests “GIGS geogCRS H to GIGS geogCRS T (1)” transformation from the factory.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 to use for creating transformation instances, or null if none.
    • 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.
    • datumAuthorityFactory

      protected final DatumAuthorityFactory datumAuthorityFactory
      Factory to use for building GeodeticDatum and PrimeMeridian components, or null if none. This is used only for tests with EPSG codes for datum 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

    • Test3208

      public Test3208(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 with DatumAuthorityFactory. 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 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_61001

      @Test @DisplayName("GIGS geogCRS A to WGS 84 (1)") public void GIGS_61001() throws FactoryException
      Tests “GIGS geogCRS A to WGS 84 (1)” transformation from the factory.
      • GIGS transformation code: 61001
      • GIGS transformation name: GIGS geogCRS A to WGS 84 (1)
      • EPSG Transformation Method: Geocentric translations
      Transformation parameters
      Parameter nameValue
      X-axis translation0 metre
      Y-axis translation0 metre
      Z-axis translation0 metre
      Remarks: No direct EPSG equivalent.
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61196

      @Test @DisplayName("GIGS geogCRS B to GIGS geogCRS A (1)") public void GIGS_61196() throws FactoryException
      Tests “GIGS geogCRS B to GIGS geogCRS A (1)” transformation from the factory.
      • GIGS transformation code: 61196
      • GIGS transformation name: GIGS geogCRS B to GIGS geogCRS A (1)
      • EPSG Transformation Method: Geocentric translations
      • EPSG equivalence: 1196 – OSGB36 to WGS 84 (2)
      Transformation parameters
      Parameter nameValue
      X-axis translation371 metres
      Y-axis translation-112 metres
      Z-axis translation434 metres
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61314

      @Test @DisplayName("GIGS geogCRS B to GIGS geogCRS A (2)") public void GIGS_61314() throws FactoryException
      Tests “GIGS geogCRS B to GIGS geogCRS A (2)” transformation from the factory.
      • GIGS transformation code: 61314
      • GIGS transformation name: GIGS geogCRS B to GIGS geogCRS A (2)
      • EPSG Transformation Method: Position Vector 7-param. transformation
      • EPSG equivalence: 1314 – OSGB36 to WGS 84 (6)
      Transformation parameters
      Parameter nameValue
      X-axis translation446.448 metres
      Y-axis translation-125.157 metres
      Z-axis translation542.06 metres
      X-axis rotation0.15 arc-second
      Y-axis rotation0.247 arc-second
      Z-axis rotation0.842 arc-second
      Scale difference-20.489 parts per millions
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61002

      @Test @DisplayName("GIGS geogCRS C to GIGS geogCRS A (1)") public void GIGS_61002() throws FactoryException
      Tests “GIGS geogCRS C to GIGS geogCRS A (1)” transformation from the factory.
      • GIGS transformation code: 61002
      • GIGS transformation name: GIGS geogCRS C to GIGS geogCRS A (1)
      • EPSG Transformation Method: Geocentric translations
      Transformation parameters
      Parameter nameValue
      X-axis translation593 metres
      Y-axis translation26 metres
      Z-axis translation479 metres
      Remarks: No direct EPSG equivalent.
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_15934

      @Test @DisplayName("GIGS geogCRS C to GIGS geogCRS A (2)") public void GIGS_15934() throws FactoryException
      Tests “GIGS geogCRS C to GIGS geogCRS A (2)” transformation from the factory.
      • GIGS transformation code: 15934
      • GIGS transformation name: GIGS geogCRS C to GIGS geogCRS A (2)
      • EPSG Transformation Method: Coordinate Frame rotation
      • EPSG equivalence: 15934 – Amersfoort to WGS 84 (3)
      Transformation parameters
      Parameter nameValue
      X-axis translation565.2369 metres
      Y-axis translation50.0087 metres
      Z-axis translation465.658 metres
      X-axis rotation1.9725 microradians
      Y-axis rotation-1.7004 microradians
      Z-axis rotation9.0677 microradians
      Scale difference4.0812 parts per millions
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61003

      @Test @DisplayName("GIGS geogCRS C to GIGS geogCRS A (3)") public void GIGS_61003() throws FactoryException
      Tests “GIGS geogCRS C to GIGS geogCRS A (3)” transformation from the factory.
      • GIGS transformation code: 61003
      • GIGS transformation name: GIGS geogCRS C to GIGS geogCRS A (3)
      • EPSG Transformation Method: Molodensky-Badekas 10-parameter transformation
      Transformation parameters
      Parameter nameValue
      X-axis translation593.0297 metres
      Y-axis translation26.0038 metres
      Z-axis translation478.7534 metres
      X-axis rotation0.4069 arc-second
      Y-axis rotation-0.3507 arc-second
      Z-axis rotation1.8703 arc-seconds
      Scale difference4.0812 parts per millions
      Ordinate 1 of evaluation point3903453.1482 metres
      Ordinate 2 of evaluation point368135.3134 metres
      Ordinate 3 of evaluation point5012970.3051 metres
      Remarks: No direct EPSG equivalent. Parameter values taken from 15740 Amersfoort to ETRS89 (4).
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61759

      @Test @DisplayName("GIGS geogCRS D to GIGS geogCRS L (1)") public void GIGS_61759() throws FactoryException
      Tests “GIGS geogCRS D to GIGS geogCRS L (1)” transformation from the factory.
      • GIGS transformation code: 61759
      • GIGS transformation name: GIGS geogCRS D to GIGS geogCRS L (1)
      • EPSG Transformation Method: Longitude rotation
      • EPSG equivalence: 1759 – Batavia (Jakarta) to Batavia (1)
      Transformation parameters
      Parameter nameValue
      Longitude offset106°48′27.79″ (106.8077194°)
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61610

      @Test @DisplayName("GIGS geogCRS E to GIGS geogCRS A (1)") public void GIGS_61610() throws FactoryException
      Tests “GIGS geogCRS E to GIGS geogCRS A (1)” transformation from the factory.
      • GIGS transformation code: 61610
      • GIGS transformation name: GIGS geogCRS E to GIGS geogCRS A (1)
      • EPSG Transformation Method: Geocentric translations
      • EPSG equivalence: 1610 – BD72 to WGS 84 (2)
      Transformation parameters
      Parameter nameValue
      X-axis translation-125.8 metres
      Y-axis translation79.9 metres
      Z-axis translation-100.5 metres
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_15929

      @Test @DisplayName("GIGS geogCRS E to GIGS geogCRS A (2)") public void GIGS_15929() throws FactoryException
      Tests “GIGS geogCRS E to GIGS geogCRS A (2)” transformation from the factory.
      • GIGS transformation code: 15929
      • GIGS transformation name: GIGS geogCRS E to GIGS geogCRS A (2)
      • EPSG Transformation Method: Coordinate Frame rotation
      • EPSG equivalence: 15929 – BD72 to WGS 84 (3)
      Transformation parameters
      Parameter nameValue
      X-axis translation-106.8686 metres
      Y-axis translation52.2978 metres
      Z-axis translation-103.7239 metres
      X-axis rotation-0.3366 arc-second
      Y-axis rotation0.457 arc-second
      Z-axis rotation-1.8422 arc-seconds
      Scale difference-1.2747 parts per millions
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61150

      @Test @DisplayName("GIGS geogCRS F to GIGS geogCRS A (1)") public void GIGS_61150() throws FactoryException
      Tests “GIGS geogCRS F to GIGS geogCRS A (1)” transformation from the factory.
      • GIGS transformation code: 61150
      • GIGS transformation name: GIGS geogCRS F to GIGS geogCRS A (1)
      • EPSG Transformation Method: Geocentric translations
      • EPSG equivalence: 1150 – GDA94 to WGS 84 (1)
      Transformation parameters
      Parameter nameValue
      X-axis translation0 metre
      Y-axis translation0 metre
      Z-axis translation0 metre
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61763

      @Test @DisplayName("GIGS geogCRS H to GIGS geogCRS T (1)") public void GIGS_61763() throws FactoryException
      Tests “GIGS geogCRS H to GIGS geogCRS T (1)” transformation from the factory.
      • GIGS transformation code: 61763
      • GIGS transformation name: GIGS geogCRS H to GIGS geogCRS T (1)
      • EPSG Transformation Method: Longitude rotation
      • EPSG equivalence: 1763 – NTF (Paris) to NTF (1)
      Transformation parameters
      Parameter nameValue
      Longitude offset2.5969213 grads
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61173

      @Test @DisplayName("GIGS geogCRS J to GIGS geogCRS A (1)") public void GIGS_61173() throws FactoryException
      Tests “GIGS geogCRS J to GIGS geogCRS A (1)” transformation from the factory.
      • GIGS transformation code: 61173
      • GIGS transformation name: GIGS geogCRS J to GIGS geogCRS A (1)
      • EPSG Transformation Method: Geocentric translations
      • EPSG equivalence: 1173 – NAD27 to WGS 84 (4)
      Transformation parameters
      Parameter nameValue
      X-axis translation-8 metres
      Y-axis translation160 metres
      Z-axis translation176 metres
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61004

      @Test @DisplayName("GIGS geogCRS J to GIGS geogCRS A (2)") public void GIGS_61004() throws FactoryException
      Tests “GIGS geogCRS J to GIGS geogCRS A (2)” transformation from the factory.
      • GIGS transformation code: 61004
      • GIGS transformation name: GIGS geogCRS J to GIGS geogCRS A (2)
      • EPSG Transformation Method: NADCON
      Transformation parameters
      Parameter nameValue
      Latitude difference filen_slope.las
      Longitude difference filen_slope.los
      Remarks: No direct EPSG equivalent. Files included with GIGS Test Procedure dataset.
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61692

      @Test @DisplayName("GIGS geogCRS J to GIGS geogCRS A (3)") public void GIGS_61692() throws FactoryException
      Tests “GIGS geogCRS J to GIGS geogCRS A (3)” transformation from the factory.
      • GIGS transformation code: 61692
      • GIGS transformation name: GIGS geogCRS J to GIGS geogCRS A (3)
      • EPSG Transformation Method: NTv2
      • EPSG equivalence: 1692 – NAD27 to WGS 84 (34)
      Transformation parameters
      Parameter nameValue
      Latitude and longitude difference fileQUE27-98.gsb
      Remarks: File included with GIGS Test Procedure dataset.
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61242

      @Test @DisplayName("GIGS geogCRS K to GIGS geogCRS A (1)") public void GIGS_61242() throws FactoryException
      Tests “GIGS geogCRS K to GIGS geogCRS A (1)” transformation from the factory.
      • GIGS transformation code: 61242
      • GIGS transformation name: GIGS geogCRS K to GIGS geogCRS A (1)
      • EPSG Transformation Method: Geocentric translations
      • EPSG equivalence: 1242 – HD72 to WGS 84 (4)
      Transformation parameters
      Parameter nameValue
      X-axis translation52.17 metres
      Y-axis translation-71.82 metres
      Z-axis translation-14.9 metres
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61123

      @Test @DisplayName("GIGS geogCRS L to GIGS geogCRS A (1)") public void GIGS_61123() throws FactoryException
      Tests “GIGS geogCRS L to GIGS geogCRS A (1)” transformation from the factory.
      • GIGS transformation code: 61123
      • GIGS transformation name: GIGS geogCRS L to GIGS geogCRS A (1)
      • EPSG Transformation Method: Geocentric translations
      • EPSG equivalence: 8452 – Batavia to WGS 84 (1)
      Transformation parameters
      Parameter nameValue
      X-axis translation-377 metres
      Y-axis translation681 metres
      Z-axis translation-50 metres
      Remarks: EPSG tfm 1123 deprecated due to change in area of applicability. Values remain unchanged. GIGS tfm code maintained for continuity.
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61275

      @Test @DisplayName("GIGS geogCRS M to GIGS geogCRS A (1)") public void GIGS_61275() throws FactoryException
      Tests “GIGS geogCRS M to GIGS geogCRS A (1)” transformation from the factory.
      • GIGS transformation code: 61275
      • GIGS transformation name: GIGS geogCRS M to GIGS geogCRS A (1)
      • EPSG Transformation Method: Geocentric translations
      • EPSG equivalence: 1275 – ED50 to WGS 84 (17)
      Transformation parameters
      Parameter nameValue
      X-axis translation-84 metres
      Y-axis translation-97 metres
      Z-axis translation-117 metres
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61193

      @Test @DisplayName("GIGS geogCRS T to GIGS geogCRS A (1)") public void GIGS_61193() throws FactoryException
      Tests “GIGS geogCRS T to GIGS geogCRS A (1)” transformation from the factory.
      • GIGS transformation code: 61193
      • GIGS transformation name: GIGS geogCRS T to GIGS geogCRS A (1)
      • EPSG Transformation Method: Geocentric translations
      • EPSG equivalence: 1193 – NTF to WGS 84 (1)
      Transformation parameters
      Parameter nameValue
      X-axis translation-168 metres
      Y-axis translation-60 metres
      Z-axis translation320 metres
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_15788

      @Test @DisplayName("GIGS geogCRS X to GIGS geogCRS A (1)") public void GIGS_15788() throws FactoryException
      Tests “GIGS geogCRS X to GIGS geogCRS A (1)” transformation from the factory.
      • GIGS transformation code: 15788
      • GIGS transformation name: GIGS geogCRS X to GIGS geogCRS A (1)
      • EPSG Transformation Method: Geocentric translations
      • EPSG equivalence: 15788 – AGD66 to WGS 84 (16)
      Transformation parameters
      Parameter nameValue
      X-axis translation-127.8 metres
      Y-axis translation-52.3 metres
      Z-axis translation152.9 metres
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61254

      @Test @DisplayName("GIGS geogCRS Y to GIGS geogCRS A (1)") public void GIGS_61254() throws FactoryException
      Tests “GIGS geogCRS Y to GIGS geogCRS A (1)” transformation from the factory.
      • GIGS transformation code: 61254
      • GIGS transformation name: GIGS geogCRS Y to GIGS geogCRS A (1)
      • EPSG Transformation Method: Geocentric translations
      • EPSG equivalence: 1254 – Pulkovo 1942 to WGS 84 (1)
      Transformation parameters
      Parameter nameValue
      X-axis translation28 metres
      Y-axis translation-130 metres
      Z-axis translation-95 metres
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.
    • GIGS_61188

      @Test @DisplayName("GIGS geogCRS Z to GIGS geogCRS A (1)") public void GIGS_61188() throws FactoryException
      Tests “GIGS geogCRS Z to GIGS geogCRS A (1)” transformation from the factory.
      • GIGS transformation code: 61188
      • GIGS transformation name: GIGS geogCRS Z to GIGS geogCRS A (1)
      • EPSG Transformation Method: Geocentric translations
      • EPSG equivalence: 1188 – NAD83 to WGS 84 (1)
      Transformation parameters
      Parameter nameValue
      X-axis translation0 metre
      Y-axis translation0 metre
      Z-axis translation0 metre
      Throws:
      FactoryException - if an error occurred while creating the transformation from the properties.