Class CRSValidator


  • public class CRSValidator
    extends ReferencingValidator
    Validates CoordinateReferenceSystem and related objects from the org.opengis.referencing.crs package.

    This class is provided for users wanting to override the validation methods. When the default behavior is sufficient, the Validators static methods provide a more convenient way to validate various kinds of objects.

    Since:
    2.2
    • Constructor Detail

      • CRSValidator

        public CRSValidator​(ValidatorContainer container)
        Creates a new validator instance.
        Parameters:
        container - the set of validators to use for validating other kinds of objects (see field javadoc).
    • Method Detail

      • dispatch

        public int dispatch​(CoordinateReferenceSystem object)
        For each interface implemented by the given object, invokes the corresponding validate(…) method defined in this class (if any).
        Parameters:
        object - the object to dispatch to validate(…) methods, or null.
        Returns:
        number of validate(…) methods invoked in this class for the given object.
      • validate

        public void validate​(GeocentricCRS object)
        Validates the given coordinate reference system. If the enforceStandardNames field is set to true (which is the default), then this method expects the axes to have the following names:
        • For Cartesian coordinate system, "geocentric X", "geocentric Y" and "geocentric Z".
        • For spherical coordinate system, "spherical latitude", "spherical longitude" and "geocentric radius".
        Parameters:
        object - the object to validate, or null.
      • validate

        public void validate​(GeographicCRS object)
        Validates the given coordinate reference system. If the enforceStandardNames field is set to true (which is the default), then this method expects the axes to have the following names:
        • "geodetic latitude", "geodetic longitude" and "ellipsoidal height" (if 3D).
        Parameters:
        object - the object to validate, or null.
      • validate

        public void validate​(ProjectedCRS object)
        Validates the given coordinate reference system. If the enforceStandardNames field is set to true (which is the default), then this method expects the axes to have the following names:
        • "northing" or "southing", "easting" or "westing".
        Parameters:
        object - the object to validate, or null.
      • validate

        public void validate​(DerivedCRS object)
        Validates the given coordinate reference system.
        Parameters:
        object - the object to validate, or null.
      • validate

        public void validate​(ImageCRS object)
        Validates the given coordinate reference system.
        Parameters:
        object - the object to validate, or null.
      • validate

        public void validate​(EngineeringCRS object)
        Validates the given coordinate reference system.
        Parameters:
        object - the object to validate, or null.
      • validate

        public void validate​(VerticalCRS object)
        Validates the given coordinate reference system. If the enforceStandardNames field is set to true (which is the default), then this method expects the axes to have the following names:
        • "depth" or "gravity-related height".
        Parameters:
        object - the object to validate, or null.
      • validate

        public void validate​(TemporalCRS object)
        Validates the given coordinate reference system.
        Parameters:
        object - the object to validate, or null.
      • validate

        public void validate​(CompoundCRS object)
        Validates the given coordinate reference system. This method will validate every individual components in the given compound CRS.
        Parameters:
        object - the object to validate, or null.
        Since:
        3.1