Class GIGS3005
-
public class GIGS3005 extends UserObjectFactoryTestCase<Conversion>
Verifies that the software allows correct definition of a user-defined map projection.Test method: Create user-defined projection for each of several different map projections. Test data: GIGS_3005_userProjection.csv
.Tested API: CoordinateOperationFactory.getOperationMethod(String)
and
CoordinateOperationFactory.createDefiningConversion(Map, OperationMethod, ParameterValueGroup)
.Expected result: The geoscience software should accept the test data. The order in which the projection 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, 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.GIGS300(; @RunWith(JUnit4.class) public class MyTest extends GIGS3005 { public MyTest() { super(new MyCoordinateOperationFactory()); } }
- Since:
- 3.1
-
-
Field Summary
Fields Modifier and Type Field Description protected CoordinateOperationFactory
copFactory
Factory to use for buildingConversion
instances, ornull
if none.ParameterValueGroup
definition
The parameters of the conversion to create.String
methodName
The name of the operation method to use.-
Fields inherited from class UserObjectFactoryTestCase
isFactoryPreservingUserValues, properties
-
Fields inherited from class TestCase
configurationTip, listener, units, validators
-
-
Constructor Summary
Constructors Constructor Description GIGS3005(CoordinateOperationFactory 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.Conversion
getIdentifiedObject()
Returns the coordinate operation instance to be tested.void
testArgentinaZone5()
Tests “GIGS projection 11” conversion creation from the factory.void
testAustralianAlbers()
Tests “GIGS projection 9” conversion creation from the factory.void
testAustralianMapGridZone54()
Tests “GIGS projection 7” conversion creation from the factory.void
testAustralianMapGridZone55()
Tests “GIGS projection 8” conversion creation from the factory.void
testBelgianLambert72()
Tests “GIGS projection 6” conversion creation from the factory.void
testBrazilPolyconic()
Tests “GIGS projection 12” conversion creation from the factory.void
testBritishNationalGrid()
Tests “GIGS projection 2” conversion creation from the factory.void
testBritishNationalGrid_altA()
Tests “GIGS projection 2 alt A” conversion creation from the factory.void
testBritishNationalGrid_altB()
Tests “GIGS projection 2 alt B” conversion creation from the factory.void
testCaspianSeaMercator()
Tests “GIGS projection 24” conversion creation from the factory.void
testEastMalaysia()
Tests “GIGS projection 14” conversion creation from the factory.void
testEOV()
Tests “GIGS projection 26” conversion creation from the factory.void
testEuropeEqualArea()
Tests “GIGS projection 16” conversion creation from the factory.void
testFranceEuroLambert()
Tests “GIGS projection 25” conversion creation from the factory.void
testGIGSProjection13()
Tests “GIGS projection 13” conversion creation from the factory.void
testGIGSProjection23()
Tests “GIGS projection 23” conversion creation from the factory.void
testGIGSProjection5()
Tests “GIGS projection 5” conversion creation from the factory.void
testJohorGrid()
Tests “GIGS projection 15” conversion creation from the factory.void
testLambertZoneII()
Tests “GIGS projection 19” conversion creation from the factory.void
testNEIEZ()
Tests “GIGS projection 27” conversion creation from the factory.void
testRDNew()
Tests “GIGS projection 4” conversion creation from the factory.void
testSouthAfricanSurveyGridZone21()
Tests “GIGS projection 10” conversion creation from the factory.void
testUtahNorth()
Tests “GIGS projection 17” conversion creation from the factory.void
testUtahNorth_ftUS()
Tests “GIGS projection 18” conversion creation from the factory.void
testUTM_zone31N()
Tests “GIGS projection 1” conversion creation from the factory.void
testUTM_zone8N()
Tests “GIGS projection 28” conversion creation from the factory.-
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
The name of the operation method to use.
-
definition
public ParameterValueGroup definition
The parameters of the conversion to create.
-
copFactory
protected final CoordinateOperationFactory copFactory
Factory to use for buildingConversion
instances, ornull
if none. This is the factory used by thegetIdentifiedObject()
method.
-
-
Constructor Detail
-
GIGS3005
public GIGS3005(CoordinateOperationFactory 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 creatingConversion
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
GIGS3004
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 classUserObjectFactoryTestCase<Conversion>
- Returns:
- the configuration of the test being run.
- See Also:
ImplementationDetails.configuration(Factory[])
- All the following values associated to the
-
getIdentifiedObject
public Conversion getIdentifiedObject() throws FactoryException
Returns the coordinate operation instance to be tested. When this method is invoked for the first time, it creates the coordinate operation to test by invoking the corresponding method fromCoordinateOperationFactory
with the currentproperties
map in argument. The created object is then cached and returned in all subsequent invocations of this method.- Specified by:
getIdentifiedObject
in classUserObjectFactoryTestCase<Conversion>
- Returns:
- the geodetic datum instance to test.
- Throws:
FactoryException
- if an error occurred while creating the coordinate operation instance.
-
testUTM_zone31N
public void testUTM_zone31N() throws FactoryException
Tests “GIGS projection 1” conversion creation from the factory.- GIGS conversion code: 65001
- GIGS conversion name: GIGS projection 1
- EPSG operation method: Transverse Mercator
- EPSG equivalence: 16031 – UTM zone 31N
Conversion parameters Parameter name Value Latitude of natural origin 0° Longitude of natural origin 3° Scale factor at natural origin 0.9996 False easting 500000 metres False northing 0 metre - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.- See Also:
GIGS2005.testUTM()
-
testBritishNationalGrid
public void testBritishNationalGrid() throws FactoryException
Tests “GIGS projection 2” conversion creation from the factory.- GIGS conversion code: 65002
- GIGS conversion name: GIGS projection 2
- EPSG operation method: Transverse Mercator
- EPSG equivalence: 19916 – British National Grid
Conversion parameters Parameter name Value Latitude of natural origin 49° Longitude of natural origin -2° Scale factor at natural origin 0.999601272 False easting 400000 metres False northing -100000 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.- See Also:
GIGS2005.testBritishNationalGrid()
-
testBritishNationalGrid_altA
public void testBritishNationalGrid_altA() throws FactoryException
Tests “GIGS projection 2 alt A” conversion creation from the factory.- GIGS conversion code: 65021
- GIGS conversion name: GIGS projection 2 alt A
- EPSG operation method: Transverse Mercator
Conversion parameters Parameter name Value Latitude of natural origin 0° Longitude of natural origin -2° Scale factor at natural origin 0.999601272 False easting 400000 metres False northing -5527462.688 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testBritishNationalGrid_altB
public void testBritishNationalGrid_altB() throws FactoryException
Tests “GIGS projection 2 alt B” conversion creation from the factory.- GIGS conversion code: 65022
- GIGS conversion name: GIGS projection 2 alt B
- EPSG operation method: Transverse Mercator
Conversion parameters Parameter name Value Latitude of natural origin 0° Longitude of natural origin -2° Scale factor at natural origin 0.999601272 False easting 400000 metres False northing -5527063.816 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testRDNew
public void testRDNew() throws FactoryException
Tests “GIGS projection 4” conversion creation from the factory.- GIGS conversion code: 65004
- GIGS conversion name: GIGS projection 4
- EPSG operation method: Oblique Stereographic
- EPSG equivalence: 19914 – RD New
Conversion parameters Parameter name Value Latitude of natural origin 52°09'22.178N Longitude of natural origin 5°23'15.5E Scale factor at natural origin 0.9999079 False easting 155000 metres False northing 463000 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.- See Also:
GIGS2005.testRDNew()
-
testGIGSProjection5
public void testGIGSProjection5() throws FactoryException
Tests “GIGS projection 5” conversion creation from the factory.- GIGS conversion code: 65005
- GIGS conversion name: GIGS projection 5
- EPSG operation method: Mercator (1SP)
Conversion parameters Parameter name Value Latitude of natural origin 0° Longitude of natural origin 3°11'32.21E Scale factor at natural origin 0.997 False easting 3900000 metres False northing 900000 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testBelgianLambert72
public void testBelgianLambert72() throws FactoryException
Tests “GIGS projection 6” conversion creation from the factory.- GIGS conversion code: 65006
- GIGS conversion name: GIGS projection 6
- EPSG operation method: Lambert Conic Conformal (2SP)
- EPSG equivalence: 19961 – Belgian Lambert 72
Conversion parameters Parameter name Value Latitude of false origin 90° Longitude of false origin 4°22'02.952E Latitude of 1st standard parallel 51°10'00.00204N Latitude of 2nd standard parallel 49°50'00.00204N Easting at false origin 150000.013 metres Northing at false origin 5400088.438 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testAustralianMapGridZone54
public void testAustralianMapGridZone54() throws FactoryException
Tests “GIGS projection 7” conversion creation from the factory.- GIGS conversion code: 65007
- GIGS conversion name: GIGS projection 7
- EPSG operation method: Transverse Mercator
- EPSG equivalence: 17454 – Australian Map Grid zone 54
Conversion parameters Parameter name Value Latitude of natural origin 0° Longitude of natural origin 141° Scale factor at natural origin 0.9996 False easting 500000 metres False northing 10000000 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.- See Also:
GIGS2005.testAustralianMapGridZones()
-
testAustralianMapGridZone55
public void testAustralianMapGridZone55() throws FactoryException
Tests “GIGS projection 8” conversion creation from the factory.- GIGS conversion code: 65008
- GIGS conversion name: GIGS projection 8
- EPSG operation method: Transverse Mercator
- EPSG equivalence: 17455 – Australian Map Grid zone 55
Conversion parameters Parameter name Value Latitude of natural origin 0° Longitude of natural origin 147° Scale factor at natural origin 0.9996 False easting 500000 metres False northing 10000000 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.- See Also:
GIGS2005.testAustralianMapGridZones()
-
testAustralianAlbers
public void testAustralianAlbers() throws FactoryException
Tests “GIGS projection 9” conversion creation from the factory.- GIGS conversion code: 65009
- GIGS conversion name: GIGS projection 9
- EPSG operation method: Albers Equal Area
- EPSG equivalence: 17365 – Australian Albers
Conversion parameters Parameter name Value Latitude of false origin 0° Longitude of false origin 132° Latitude of 1st standard parallel -18° Latitude of 2nd standard parallel -36° Easting at false origin 0 metre Northing at false origin 0 metre - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testSouthAfricanSurveyGridZone21
public void testSouthAfricanSurveyGridZone21() throws FactoryException
Tests “GIGS projection 10” conversion creation from the factory.- GIGS conversion code: 65010
- GIGS conversion name: GIGS projection 10
- EPSG operation method: Transverse Mercator (South Orientated)
- EPSG equivalence: 17521 – South African Survey Grid zone 21
Conversion parameters Parameter name Value Latitude of natural origin 0° Longitude of natural origin 21° Scale factor at natural origin 1 False easting 0 metre False northing 0 metre - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testArgentinaZone5
public void testArgentinaZone5() throws FactoryException
Tests “GIGS projection 11” conversion creation from the factory.- GIGS conversion code: 65011
- GIGS conversion name: GIGS projection 11
- EPSG operation method: Transverse Mercator
- EPSG equivalence: 18035 – Argentina zone 5
Conversion parameters Parameter name Value Latitude of natural origin -90° Longitude of natural origin -60° Scale factor at natural origin 1 False easting 5500000 metres False northing 0 metre - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.- See Also:
GIGS2005.testArgentinaZones()
-
testBrazilPolyconic
public void testBrazilPolyconic() throws FactoryException
Tests “GIGS projection 12” conversion creation from the factory.- GIGS conversion code: 65012
- GIGS conversion name: GIGS projection 12
- EPSG operation method: American Polyconic
- EPSG equivalence: 19941 – Brazil Polyconic
Conversion parameters Parameter name Value Latitude of natural origin 0° Longitude of natural origin -54° False easting 5000000 metres False northing 10000000 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.- See Also:
GIGS2005.testBrazilPolyconic()
-
testGIGSProjection13
public void testGIGSProjection13() throws FactoryException
Tests “GIGS projection 13” conversion creation from the factory.- GIGS conversion code: 65013
- GIGS conversion name: GIGS projection 13
- EPSG operation method: Hotine Oblique Mercator (variant B)
- Specific usage / Remarks: metre
Conversion parameters Parameter name Value Latitude of projection centre 4° Longitude of projection centre 115° Azimuth of initial line 53°18'56.9158 Angle from Rectified to Skew Grid 53°07'48.3685 Scale factor on initial line 0.99984 Easting at projection centre 590521.147 metres Northing at projection centre 442890.861 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testEastMalaysia
public void testEastMalaysia() throws FactoryException
Tests “GIGS projection 14” conversion creation from the factory.- GIGS conversion code: 65014
- GIGS conversion name: GIGS projection 14
- EPSG operation method: Hotine Oblique Mercator (variant A)
- EPSG equivalence: 19894 – East Malaysia BRSO
- Specific usage / Remarks: metre
Conversion parameters Parameter name Value Latitude of projection centre 4° Longitude of projection centre 115° Azimuth of initial line 53°18'56.9158 Angle from Rectified to Skew Grid 53°07'48.3685 Scale factor on initial line 0.99984 False easting 0 metre False northing 0 metre - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testJohorGrid
public void testJohorGrid() throws FactoryException
Tests “GIGS projection 15” conversion creation from the factory.- GIGS conversion code: 65015
- GIGS conversion name: GIGS projection 15
- EPSG operation method: Cassini-Soldner
- EPSG equivalence: 19893 – Johor Grid
Conversion parameters Parameter name Value Latitude of natural origin 2°07'18.0471N Longitude of natural origin 103°25'40.5704E False easting -14810.562 metres False northing 8758.32 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testEuropeEqualArea
public void testEuropeEqualArea() throws FactoryException
Tests “GIGS projection 16” conversion creation from the factory.- GIGS conversion code: 65016
- GIGS conversion name: GIGS projection 16
- EPSG operation method: Lambert Azimuthal Equal Area
- EPSG equivalence: 19986 – Europe Equal Area 2001
Conversion parameters Parameter name Value Latitude of natural origin 52° Longitude of natural origin 10° False easting 4321000 metres False northing 3210000 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testUtahNorth
public void testUtahNorth() throws FactoryException
Tests “GIGS projection 17” conversion creation from the factory.- GIGS conversion code: 65017
- GIGS conversion name: GIGS projection 17
- EPSG operation method: Lambert Conic Conformal (2SP)
- EPSG equivalence: 15262 – Utah North (ft)
Conversion parameters Parameter name Value Latitude of false origin 40°20'N Longitude of false origin 111°30'W Latitude of 1st standard parallel 41°47'N Latitude of 2nd standard parallel 40°43'N Easting at false origin 1640419.948 foots Northing at false origin 3280839.895 foots - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testUtahNorth_ftUS
public void testUtahNorth_ftUS() throws FactoryException
Tests “GIGS projection 18” conversion creation from the factory.- GIGS conversion code: 65018
- GIGS conversion name: GIGS projection 18
- EPSG operation method: Lambert Conic Conformal (2SP)
- EPSG equivalence: 15297 – Utah North (ftUS)
Conversion parameters Parameter name Value Latitude of false origin 40°20'N Longitude of false origin 111°30'W Latitude of 1st standard parallel 41°47'N Latitude of 2nd standard parallel 40°43'N Easting at false origin 1640416.667 US survey foots Northing at false origin 3280833.333 US survey foots - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testLambertZoneII
public void testLambertZoneII() throws FactoryException
Tests “GIGS projection 19” conversion creation from the factory.- GIGS conversion code: 65019
- GIGS conversion name: GIGS projection 19
- EPSG operation method: Lambert Conic Conformal (1SP)
- EPSG equivalence: 18082 – Lambert zone II
Conversion parameters Parameter name Value Latitude of natural origin 52 grads Longitude of natural origin 0 grad Scale factor at natural origin 0.99987742 False easting 600000 metres False northing 2200000 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testGIGSProjection23
public void testGIGSProjection23() throws FactoryException
Tests “GIGS projection 23” conversion creation from the factory.- GIGS conversion code: 65023
- GIGS conversion name: GIGS projection 23
- EPSG operation method: Transverse Mercator
- EPSG equivalence: No direct equivalent
Conversion parameters Parameter name Value Latitude of natural origin 0° Longitude of natural origin 3° Scale factor at natural origin 0.9996 False easting 1640416.667 US survey foots False northing 0 US survey foot - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testCaspianSeaMercator
public void testCaspianSeaMercator() throws FactoryException
Tests “GIGS projection 24” conversion creation from the factory.- GIGS conversion code: 65024
- GIGS conversion name: GIGS projection 24
- EPSG operation method: Mercator (Variant B)
- EPSG equivalence: 19884 – Caspian Sea Mercator
Conversion parameters Parameter name Value Latitude of 1st standard parallel 42° Longitude of natural origin 51° False easting 0 metre False northing 0 metre - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testFranceEuroLambert
public void testFranceEuroLambert() throws FactoryException
Tests “GIGS projection 25” conversion creation from the factory.- GIGS conversion code: 65025
- GIGS conversion name: GIGS projection 25
- EPSG operation method: Lambert Conic Conformal (1SP)
- EPSG equivalence: 18086 – France EuroLambert
Conversion parameters Parameter name Value Latitude of natural origin 46°48'N Longitude of natural origin 2°20'14.025E Scale factor at natural origin 0.99987742 False easting 600000 metres False northing 2200000 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.
-
testEOV
public void testEOV() throws FactoryException
Tests “GIGS projection 26” conversion creation from the factory.- GIGS conversion code: 65026
- GIGS conversion name: GIGS projection 26
- EPSG operation method: Hotine Oblique Mercator (variant B)
- EPSG equivalence: 19931 – EOV
- Specific usage / Remarks: metre
Conversion parameters Parameter name Value Latitude of projection centre 47°08'39.8174N Longitude of projection centre 19°02'54.8584E Azimuth of initial line 90° Angle from Rectified to Skew Grid 90° Scale factor on initial line 0.99993 Easting at projection centre 650000 metres Northing at projection centre 200000 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.- See Also:
GIGS2005.testEOV()
-
testNEIEZ
public void testNEIEZ() throws FactoryException
Tests “GIGS projection 27” conversion creation from the factory.- GIGS conversion code: 65027
- GIGS conversion name: GIGS projection 27
- EPSG operation method: Mercator (variant A)
- EPSG equivalence: 19905 – NEIEZ
Conversion parameters Parameter name Value Latitude of natural origin 0° Longitude of natural origin 110° Scale factor at natural origin 0.997 False easting 3900000 metres False northing 900000 metres - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.- See Also:
GIGS2005.testNEIEZ()
-
testUTM_zone8N
public void testUTM_zone8N() throws FactoryException
Tests “GIGS projection 28” conversion creation from the factory.- GIGS conversion code: 65028
- GIGS conversion name: GIGS projection 28
- EPSG operation method: Transverse Mercator
- EPSG equivalence: 16008 – UTM zone 8N
Conversion parameters Parameter name Value Latitude of natural origin 0° Longitude of natural origin -135° Scale factor at natural origin 0.9996 False easting 500000 metres False northing 0 metre - Throws:
FactoryException
- if an error occurred while creating the conversion from the properties.- See Also:
GIGS2005.testUTM()
-
-