public class CSValidator extends ReferencingValidator
Validates CoordinateSystem and related objects from the org.opengis.referencing.cs 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
TODO:
Add checks for Unit of Measurement depending on the coordinate system type. For example, EllipsoidalCS expects two angular values and one linear value (if 3D).
  • Constructor Details

    • CSValidator

      public CSValidator(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 Details

    • dispatch

      public int dispatch(CoordinateSystem 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(CoordinateSystemAxis object)
      Validates the given axis.
      Parameters:
      object - the object to validate, or null.
    • validate

      public void validate(CartesianCS object)
      Validates the given coordinate system. This method ensures that axis directions are perpendicular to each other. Only known or compatibles directions are compared (e.g. NORTH with EAST). Unknown or incompatible directions (e.g. NORTH with FUTURE) are ignored.
      Parameters:
      object - the object to validate, or null.
    • validate

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

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

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

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

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

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

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

      public void validate(UserDefinedCS object)
      Validates the given coordinate system.
      Parameters:
      object - the object to validate, or null.