Class GIGS2009
-
public class GIGS2009 extends AuthorityFactoryTestCase<Transformation>
Verifies reference vertical transformations bundled with the geoscience software.Test method: Compare transformation definitions included in the software against the EPSG Dataset. Test data: GIGS_2009_libVertTfm.csv
and EPSG Dataset.Tested API: CoordinateOperationAuthorityFactory.createCoordinateOperation(String)
.Expected result: Transformation definitions bundled with the software should have same name, method name, defining parameters and parameter values as in EPSG Dataset. See current version of the EPSG Dataset. The values of the parameters should be correct to at least 10 significant figures. Transformations 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.GIGS2009; @RunWith(JUnit4.class) public class MyTest extends GIGS2009 { public MyTest() { super(new MyCoordinateOperationAuthorityFactory()); } }
- Since:
- 3.1
-
-
Field Summary
Fields Modifier and Type Field Description protected CoordinateOperationAuthorityFactory
copAuthorityFactory
Factory to use for buildingTransformation
instances, ornull
if none.String
methodName
Name of the expected transformation method.-
Fields inherited from class AuthorityFactoryTestCase
aliases, code, isDependencyIdentificationSupported, isDeprecatedObjectCreationSupported, isStandardAliasSupported, isStandardNameSupported, name
-
Fields inherited from class TestCase
configurationTip, listener, units, validators
-
-
Constructor Summary
Constructors Constructor Description GIGS2009(CoordinateOperationAuthorityFactory copFactory)
Creates a new test using the given factory.
-
Method Summary
Modifier and Type Method Description Configuration
configuration()
Returns information about the configuration of the test which has been run.static List<Factory[]>
factories()
Returns a default set of factories to use for running the tests.Transformation
getIdentifiedObject()
Returns the transformation instance to be tested.void
testBalticDepth_to_AIOC95()
Tests “Baltic depth to AIOC95 depth (1)” transformation creation from the factory.void
testBalticHeight_to_AIOC95()
Tests “Baltic height to AIOC95 height (1)” transformation creation from the factory.void
testWGS84_to_EGM96()
Tests “WGS 84 to EGM96 Geoid height (1)” transformation creation from the factory.-
Methods inherited from class AuthorityFactoryTestCase
getVerifiableName
-
Methods inherited from class ReferencingTestCase
verifyCoordinateSystem, verifyFlattenedSphere, verifyGeographicExtent, verifyIdentification, verifyParameter, verifyPrimeMeridian, verifyTimeExtent, verifyVerticalExtent
-
Methods inherited from class TestCase
factories, factories, getEnabledFlags
-
-
-
-
Field Detail
-
methodName
public String methodName
Name of the expected transformation method.
-
copAuthorityFactory
protected final CoordinateOperationAuthorityFactory copAuthorityFactory
Factory to use for buildingTransformation
instances, ornull
if none. This is the factory used by thegetIdentifiedObject()
method.
-
-
Constructor Detail
-
GIGS2009
public GIGS2009(CoordinateOperationAuthorityFactory copFactory)
Creates a new test using the given factory. If a given factory isnull
, then the tests which depend on it will be skipped.- Parameters:
copFactory
- factory for creatingTransformation
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 theTestCase.factories(Class[])
javadoc.- Returns:
- the default set of arguments to be given to the
GIGS2009
constructor.
-
configuration
public Configuration configuration()
Returns information about the configuration of the test which has been run. This method returns a map containing:- All the following values associated to the
Configuration.Key
of the same name:
- Overrides:
configuration
in classAuthorityFactoryTestCase<Transformation>
- Returns:
- the configuration of the test being run.
- See Also:
ImplementationDetails.configuration(Factory[])
- All the following values associated to the
-
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 theCoordinateOperationAuthorityFactory.createCoordinateOperation(String)
method with the currentAuthorityFactoryTestCase.code
value in argument. The created object is then cached and returned in all subsequent invocations of this method.- Specified by:
getIdentifiedObject
in classAuthorityFactoryTestCase<Transformation>
- Returns:
- the transformation instance to test.
- Throws:
FactoryException
- if an error occurred while creating the transformation instance.
-
testBalticDepth_to_AIOC95
public void testBalticDepth_to_AIOC95() throws FactoryException
Tests “Baltic depth to AIOC95 depth (1)” transformation creation from the factory.- EPSG transformation code: 5445
- EPSG transformation name: Baltic depth to AIOC95 depth (1)
- Transformation method: Vertical Offset
- Particularly important to E&P industry.
- Throws:
FactoryException
- if an error occurred while creating the transformation from the EPSG code.
-
testBalticHeight_to_AIOC95
public void testBalticHeight_to_AIOC95() throws FactoryException
Tests “Baltic height to AIOC95 height (1)” transformation creation from the factory.- EPSG transformation code: 5443
- EPSG transformation name: Baltic height to AIOC95 height (1)
- Transformation method: Vertical Offset
- Particularly important to E&P industry.
- Throws:
FactoryException
- if an error occurred while creating the transformation from the EPSG code.
-
testWGS84_to_EGM96
public void testWGS84_to_EGM96() throws FactoryException
Tests “WGS 84 to EGM96 Geoid height (1)” transformation creation from the factory.- EPSG transformation code: 10084
- EPSG transformation name: WGS 84 to EGM96 Geoid height (1)
- Transformation method: Geographic3D to GravityRelatedHeight (EGM)
- Specific usage / Remarks: Geoid model.
- Particularly important to E&P industry.
- Throws:
FactoryException
- if an error occurred while creating the transformation from the EPSG code.
-
-