Class GIGS2003
-
public class GIGS2003 extends AuthorityFactoryTestCase<PrimeMeridian>
Verifies reference prime meridians bundled with the geoscience software.Test method: Compare prime meridian definitions included in the software against the EPSG Dataset. Test data: GIGS_2003_libPrimeMeridian.csvand 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, 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.GIGS2003; @RunWith(JUnit4.class) public class MyTest extends GIGS2003 { public MyTest() { super(new MyDatumAuthorityFactory()); } }- Since:
- 3.1
-
-
Field Summary
Fields Modifier and Type Field Description protected DatumAuthorityFactorydatumAuthorityFactoryFactory to use for buildingPrimeMeridianinstances, ornullif none.doublegreenwichLongitudeThe expected Greenwich longitude in decimal degrees.-
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 GIGS2003(DatumAuthorityFactory datumFactory)Creates a new test using the given factory.
-
Method Summary
Modifier and Type Method Description Configurationconfiguration()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.PrimeMeridiangetIdentifiedObject()Returns the prime meridian instance to be tested.voidtestAthens()Tests “Athens” prime meridian creation from the factory.voidtestBern()Tests “Bern” prime meridian creation from the factory.voidtestBogota()Tests “Bogota” prime meridian creation from the factory.voidtestBrussels()Tests “Brussels” prime meridian creation from the factory.voidtestFerro()Tests “Ferro” prime meridian creation from the factory.voidtestGreenwich()Tests “Greenwich” prime meridian creation from the factory.voidtestJakarta()Tests “Jakarta” prime meridian creation from the factory.voidtestLisbon()Tests “Lisbon” prime meridian creation from the factory.voidtestMadrid()Tests “Madrid” prime meridian creation from the factory.voidtestOslo()Tests “Oslo” prime meridian creation from the factory.voidtestParis()Tests “Paris” prime meridian creation from the factory.voidtestParisRGS()Tests “Paris RGS” prime meridian creation from the factory.voidtestRome()Tests “Rome” prime meridian creation from the factory.voidtestStockholm()Tests “Stockholm” prime meridian 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
-
greenwichLongitude
public double greenwichLongitude
The expected Greenwich longitude in decimal degrees.
-
datumAuthorityFactory
protected final DatumAuthorityFactory datumAuthorityFactory
Factory to use for buildingPrimeMeridianinstances, ornullif none. This is the factory used by thegetIdentifiedObject()method.
-
-
Constructor Detail
-
GIGS2003
public GIGS2003(DatumAuthorityFactory datumFactory)
Creates a new test using the given factory. If a given factory isnull, then the tests which depend on it will be skipped.- Parameters:
datumFactory- factory for creatingPrimeMeridianinstances.
-
-
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
GIGS2003constructor.
-
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.Keyof the same name:
- Overrides:
configurationin classAuthorityFactoryTestCase<PrimeMeridian>- Returns:
- the configuration of the test being run.
- See Also:
ImplementationDetails.configuration(Factory[])
- All the following values associated to the
-
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 theDatumAuthorityFactory.createPrimeMeridian(String)method with the currentAuthorityFactoryTestCase.codevalue in argument. The created object is then cached and returned in all subsequent invocations of this method.- Specified by:
getIdentifiedObjectin classAuthorityFactoryTestCase<PrimeMeridian>- Returns:
- the prime meridian instance to test.
- Throws:
FactoryException- if an error occurred while creating the prime meridian instance.
-
testGreenwich
public void testGreenwich() throws FactoryException
Tests “Greenwich” prime meridian creation from the factory.- EPSG prime meridian code: 8901
- EPSG prime meridian name: Greenwich
- Greenwich longitude: 0°
- Particularly important to E&P industry.
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.- See Also:
GIGS3003.testGreenwich()
-
testFerro
public void testFerro() throws FactoryException
Tests “Ferro” prime meridian creation from the factory.- EPSG prime meridian code: 8909
- EPSG prime meridian name: Ferro
- Greenwich longitude: -17°40′
- Particularly important to E&P industry.
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.
-
testJakarta
public void testJakarta() 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″
- Particularly important to E&P industry.
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.- See Also:
GIGS3003.testJakarta()
-
testParis
public void testParis() throws FactoryException
Tests “Paris” prime meridian creation from the factory.- EPSG prime meridian code: 8903
- EPSG prime meridian name: Paris
- Greenwich longitude: 2.5969213
- Specific usage / Remarks: Equivalent to 2°20'14.025\".
- Particularly important to E&P industry.
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.- See Also:
GIGS3003.testParis()
-
testAthens
public void testAthens() 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″
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.
-
testBern
public void testBern() 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″
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.
-
testBogota
public void testBogota() 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″
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.- See Also:
GIGS3003.testBogota()
-
testBrussels
public void testBrussels() 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″
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.
-
testLisbon
public void testLisbon() 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″
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.
-
testMadrid
public void testMadrid() throws FactoryException
Tests “Madrid” prime meridian creation from the factory.- EPSG prime meridian code: 8905
- EPSG prime meridian name: Madrid
- Greenwich longitude: -3°41′16.58″
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.
-
testOslo
public void testOslo() 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
- Greenwich longitude: 10°43′22.5″
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.
-
testParisRGS
public void testParisRGS() 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″
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.
-
testRome
public void testRome() 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″
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.
-
testStockholm
public void testStockholm() 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″
- Throws:
FactoryException- if an error occurred while creating the prime meridian from the EPSG code.
-
-