|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectTestCase
AuthorityFactoryTest
public class AuthorityFactoryTest
Tests the creation of referencing objects from the authority factories given at construction time.
In order to specify their factories and run the tests in a JUnit framework, implementors can define a subclass as below:
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.opengis.test.referencing.AuthorityFactoryTest;
@RunWith(JUnit4.class)
public class MyTest extends AuthorityFactoryTest {
public MyTest() {
super(new MyCRSAuthorityFactory(), new MyCSAuthorityFactory(), new MyDatumAuthorityFactory());
}
}
Alternatively this test class can also be used directly in the TestSuite,
which combine every tests defined in the GeoAPI conformance module.
Many ProjectedCRS instances tested in this class use the same projections than the
MathTransform instances tested in ParameterizedTransformTest. However the later
test class expects (λ,φ) input ordinates in degrees and (x,y)
output ordinates in metres, while this AuthorityFactoryTest class expects input and
output ordinates in CRS-dependent units and axis order.
ObjectFactoryTest,
ParameterizedTransformTest,
TestSuite| Field Summary | |
|---|---|
protected CRSAuthorityFactory |
crsAuthorityFactory
Factory to use for building CoordinateReferenceSystem instances, or null if none. |
protected CSAuthorityFactory |
csAuthorityFactory
Factory to use for building CoordinateSystem instances, or null if none. |
protected DatumAuthorityFactory |
datumAuthorityFactory
Factory to use for building Datum instances, or null if none. |
protected boolean |
isAxisSwappingSupported
true if crsAuthorityFactory and csAuthorityFactory supports the
creation of coordinate system with (y,x) axis order. |
protected IdentifiedObject |
object
The identified object (typically a CoordinateReferenceSystem) being tested. |
protected double |
primeMeridian
The expected prime meridian of the CRS being tested, in decimal degrees from Greenwich. |
protected boolean |
swapxy
true If the easting and northing axes shall be swapped. |
protected boolean |
swapλφ
true if the longitude and latitude axes shall be swapped. |
protected double |
toAngularUnit
Conversion factor from degrees to the CRS-specific angular units. |
protected double |
toLinearUnit
Conversion factor from metres to the CRS-specific linear units. |
| Fields inherited from class TestCase |
|---|
configurationTip, listener, NO_FACTORY, validators |
| Constructor Summary | |
|---|---|
AuthorityFactoryTest(CRSAuthorityFactory crsFactory,
CSAuthorityFactory csFactory,
DatumAuthorityFactory datumFactory)
Creates a new test using the given factories. |
|
| Method Summary | |
|---|---|
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. |
void |
testEPSG_2065()
Tests the EPSG:2065 (CRS S-JTSK (Ferro) / Krovak) projected CRS. |
void |
testEPSG_2314()
Tests the EPSG:2314 (Trinidad 1903 / Trinidad Grid) projected CRS. |
void |
testEPSG_24200()
Tests the EPSG:24200 (JAD69 / Jamaica National Grid) projected CRS. |
void |
testEPSG_27700()
Tests the EPSG:27700 (OSGB 1936 / British National Grid) projected CRS. |
void |
testEPSG_28992()
Tests the EPSG:28992 (Amersfoort / RD New) projected CRS. |
void |
testEPSG_29873()
Tests the EPSG:29873 (Timbalai 1948 / RSO Borneo (m)) projected CRS. |
void |
testEPSG_3002()
Tests the EPSG:3002 (Makassar / NEIEZ) projected CRS. |
void |
testEPSG_3032()
Tests the EPSG:3032 (WGS 84 / Australian Antarctic Polar Stereographic) projected CRS. |
void |
testEPSG_3035()
Tests the EPSG:3035 (ETRS89 / LAEA Europe) projected CRS. |
void |
testEPSG_31300()
Tests the EPSG:31300 (Belge 1972 / Belge Lambert 72) projected CRS. |
void |
testEPSG_32040()
Tests the EPSG:32040 (NAD27 / Texas South Central) projected CRS. |
void |
testEPSG_32661()
Tests the EPSG:32661 (WGS 84 / UPS North (N,E)) projected CRS. |
void |
testEPSG_3388()
Tests the EPSG:3388 (Pulkovo 1942 / Caspian Sea Mercator) projected CRS. |
void |
testEPSG_3857()
Tests the EPSG:3857 (WGS 84 / Pseudo-Mercator) projected CRS. |
void |
testEPSG_5041()
Tests the EPSG:5041 (WGS 84 / UPS North (E,N)) projected CRS. |
void |
testIGNF_MILLER()
Tests the IGNF:MILLER (unofficial EPSG:310642901 code) projected CRS. |
void |
testWGS84()
Tests the creation of the EPSG:4326 GeographicCRS. |
| Methods inherited from class TestCase |
|---|
addTestListener, factories, factories, getEnabledFlags, removeTestListener |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final CRSAuthorityFactory crsAuthorityFactory
CoordinateReferenceSystem instances, or null if none.
protected final CSAuthorityFactory csAuthorityFactory
CoordinateSystem instances, or null if none.
protected final DatumAuthorityFactory datumAuthorityFactory
Datum instances, or null if none.
protected IdentifiedObject object
CoordinateReferenceSystem) being tested.
Every test methods in this class will set this field to a non-null value.
Implementors can use this value for their own assertions after any test has been run.
protected boolean swapλφ
true if the longitude and latitude axes shall be swapped. This flag applies
only to geographic coordinates.
Default value: true, since the majority of GeographicCRS
defined in the EPSG database uses the (φλ) axis order.
protected boolean swapxy
true If the easting and northing axes shall be swapped. This flag applies only
to projected coordinates.
Default value: false, since the majority of ProjectedCRS defined
in the EPSG database uses the (x,y) axis order.
protected double primeMeridian
Default value: 0.0.
protected double toAngularUnit
Default value: 1.0.
protected double toLinearUnit
Default value: 1.0.
protected boolean isAxisSwappingSupported
true if crsAuthorityFactory and csAuthorityFactory supports the
creation of coordinate system with (y,x) axis order. If this field is
set to false, then the tests that would normally expect (y,x)
axis order or South Oriented CRS will rather use the (x,y)
axis order and North Oriented CRS in their test.
| Constructor Detail |
|---|
public AuthorityFactoryTest(CRSAuthorityFactory crsFactory,
CSAuthorityFactory csFactory,
DatumAuthorityFactory datumFactory)
null,
then the tests which depend on it will be skipped.
crsFactory - Factory for creating CoordinateReferenceSystem instances.csFactory - Factory for creating CoordinateSystem instances.datumFactory - Factory for creating Datum instances.| Method Detail |
|---|
public static List<Factory[]> factories()
TestCase.factories(Class[]) javadoc.
AuthorityFactoryTest constructor.public Configuration configuration()
ParameterizedTransformTest class except mtFactory.Configuration.Key of the same name:
configuration in class TestCaseImplementationDetails.configuration(Factory[])
public void testWGS84()
throws NoSuchAuthorityCodeException,
FactoryException
GeographicCRS.
NoSuchAuthorityCodeException - If the specified code is not found among the ones present in the database.
FactoryException - If the creation of the CoordinateReferenceSystem failed for an other raison.
public void testEPSG_3002()
throws FactoryException,
TransformException
| Projection method: | Mercator (variant A) |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (x,y) in metres |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testMercator1SP()
public void testEPSG_3388()
throws FactoryException,
TransformException
| Projection method: | Mercator (variant B) |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (y,x) in metres - note the axis order! |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testMercator2SP()
public void testEPSG_3857()
throws FactoryException,
TransformException
| Projection method: | Mercator Popular Visualisation Pseudo Mercator |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (x,y) in metres |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testPseudoMercator()
public void testIGNF_MILLER()
throws FactoryException,
TransformException
| Projection method: | Miller |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (x,y) in metres |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testMiller()
public void testEPSG_29873()
throws FactoryException,
TransformException
| Projection method: | Hotine Oblique Mercator (variant B) |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (x,y) in metres |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testHotineObliqueMercator()
public void testEPSG_27700()
throws FactoryException,
TransformException
| Projection method: | Transverse Mercator |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (x,y) in metres |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testTransverseMercator()
public void testEPSG_2314()
throws FactoryException,
TransformException
| Projection method: | Cassini-Soldner |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (x,y) in Clarke's foot - note the units! |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testCassiniSoldner()
public void testEPSG_24200()
throws FactoryException,
TransformException
| Projection method: | Lambert Conic Conformal (1SP) |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (x,y) in metres |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testLambertConicConformal1SP()
public void testEPSG_32040()
throws FactoryException,
TransformException
| Projection method: | Lambert Conic Conformal (2SP) |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (x,y) in US feet - note the units! |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testLambertConicConformal2SP()
public void testEPSG_31300()
throws FactoryException,
TransformException
| Projection method: | Lambert Conic Conformal (2SP Belgium) |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (x,y) in metres |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testLambertConicConformalBelgium()
public void testEPSG_3035()
throws FactoryException,
TransformException
| Projection method: | Lambert Azimuthal Equal Area |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (y,x) in metres - note the axis order! |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testLambertAzimuthalEqualArea()
public void testEPSG_5041()
throws FactoryException,
TransformException
| Projection method: | Polar Stereographic (variant A) |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (x,y) in metres |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testPolarStereographicA()
public void testEPSG_32661()
throws FactoryException,
TransformException
| Projection method: | Polar Stereographic (variant A) |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (y,x) in metres - note the axis order! |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testPolarStereographicA()
public void testEPSG_3032()
throws FactoryException,
TransformException
| Projection method: | Polar Stereographic (variant B) |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (x,y) in metres |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testPolarStereographicB()
public void testEPSG_28992()
throws FactoryException,
TransformException
| Projection method: | Oblique Stereographic |
| Prime meridian: | Greenwich |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (x,y) in metres |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testObliqueStereographic()
public void testEPSG_2065()
throws FactoryException,
TransformException
| Projection method: | Krovak |
| Prime meridian: | Ferro (17°40'W from Greenwich) |
| Source ordinates: | (φ,λ) in degrees |
| Output ordinates: | (y,x) in metres, south oriented (S,W) |
FactoryException - If the math transform can not be created.
TransformException - If the example point can not be transformed.ParameterizedTransformTest.testKrovak()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||