Class ReferencingTest


  • public abstract class ReferencingTest
    extends TestCase
    Tests Coordinate Reference System and related objects from the org.opengis.referencing.crs, cs and datum packages. CRS instances are created using the factories given at construction time.
    Since:
    2.3
    Version:
    3.0.1
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected CRSFactory crsFactory
      Factory to build a coordinate reference system, or null if none.
      protected CSFactory csFactory
      Factory to build a coordinate system, or null if none.
      protected DatumFactory datumFactory
      Factory to build a datum, or null if none.
      private Units units
      The units of measurement to be used for the tests.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.util.Map<java.lang.String,​java.lang.String> createMapWithName​(java.lang.String value)
      Builds a map containing only one value, composed by the IdentifiedObject.NAME_KEY identifier and the value specified.
      void testWGS84()
      Tests the creation of the WGS84 CRS, and verifies that the axes are in the given (longitude, latitude) order.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • units

        private final Units units
        The units of measurement to be used for the tests.
      • crsFactory

        protected final CRSFactory crsFactory
        Factory to build a coordinate reference system, or null if none.
      • csFactory

        protected final CSFactory csFactory
        Factory to build a coordinate system, or null if none.
      • datumFactory

        protected final DatumFactory datumFactory
        Factory to build a datum, or null if none.
    • Constructor Detail

      • ReferencingTest

        protected ReferencingTest​(CRSFactory crsFactory,
                                  CSFactory csFactory,
                                  DatumFactory datumFactory)
        Creates a new test using the given factories. If a given factory is null, then the tests which depend on it will be skipped.
        Parameters:
        crsFactory - Factory for creating a CoordinateReferenceSystem.
        csFactory - Factory for creating a CoordinateSystem.
        datumFactory - Factory for creating a Datum.
    • Method Detail

      • createMapWithName

        private static java.util.Map<java.lang.String,​java.lang.String> createMapWithName​(java.lang.String value)
        Builds a map containing only one value, composed by the IdentifiedObject.NAME_KEY identifier and the value specified.
        Parameters:
        value - The value for the name key.
        Returns:
        A map containing only the value specified for the name key.
      • testWGS84

        public void testWGS84()
                       throws FactoryException
        Tests the creation of the WGS84 CRS, and verifies that the axes are in the given (longitude, latitude) order.
        Throws:
        FactoryException - if a factory fails to create a referencing object.