Package org.opengis.test.referencing
Class CRSValidator
- Object
-
- Validator
-
- ReferencingValidator
-
- CRSValidator
-
public class CRSValidator extends ReferencingValidator
ValidatesCoordinateReferenceSystem
and related objects from theorg.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
-
-
Field Summary
Fields Modifier and Type Field Description boolean
enforceStandardNames
true
if standard names shall be enforced when such names are defined by an OGC/ISO standard.-
Fields inherited from class Validator
container, DEFAULT_TOLERANCE, enforceForbiddenAttributes, logger, requireMandatoryAttributes
-
-
Constructor Summary
Constructors Constructor Description CRSValidator(ValidatorContainer container)
Creates a new validator instance.
-
Method Summary
Modifier and Type Method Description int
dispatch(CoordinateReferenceSystem object)
For each interface implemented by the given object, invokes the correspondingvalidate(…)
method defined in this class (if any).void
validate(CompoundCRS object)
Validates the given coordinate reference system.void
validate(DerivedCRS object)
Validates the given coordinate reference system.void
validate(EngineeringCRS object)
Validates the given coordinate reference system.void
validate(GeocentricCRS object)
Validates the given coordinate reference system.void
validate(GeographicCRS object)
Validates the given coordinate reference system.void
validate(ImageCRS object)
Validates the given coordinate reference system.void
validate(ProjectedCRS object)
Validates the given coordinate reference system.void
validate(TemporalCRS object)
Validates the given coordinate reference system.void
validate(VerticalCRS object)
Validates the given coordinate reference system.-
Methods inherited from class ReferencingValidator
dispatchObject, validate
-
Methods inherited from class Validator
conditional, forbidden, mandatory, validate
-
-
-
-
Field Detail
-
enforceStandardNames
public boolean enforceStandardNames
true
if standard names shall be enforced when such names are defined by an OGC/ISO standard. For example the ISO 19111 standard constraints theGeographicCRS
axis names to "geodetic latitude", "geodetic longitude" and "ellipsoidal height" (if 3D) names. Those axis names will be verified by this validator, unless this fields is explicitely set tofalse
.- Since:
- 3.1
- See Also:
validate(GeocentricCRS)
,validate(GeographicCRS)
,validate(ProjectedCRS)
,validate(VerticalCRS)
-
-
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 correspondingvalidate(…)
method defined in this class (if any).- Parameters:
object
- the object to dispatch tovalidate(…)
methods, ornull
.- 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 theenforceStandardNames
field is set totrue
(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, ornull
.
-
validate
public void validate(GeographicCRS object)
Validates the given coordinate reference system. If theenforceStandardNames
field is set totrue
(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, ornull
.
-
validate
public void validate(ProjectedCRS object)
Validates the given coordinate reference system. If theenforceStandardNames
field is set totrue
(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, ornull
.
-
validate
public void validate(DerivedCRS object)
Validates the given coordinate reference system.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(ImageCRS object)
Validates the given coordinate reference system.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(EngineeringCRS object)
Validates the given coordinate reference system.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(VerticalCRS object)
Validates the given coordinate reference system. If theenforceStandardNames
field is set totrue
(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, ornull
.
-
validate
public void validate(TemporalCRS object)
Validates the given coordinate reference system.- Parameters:
object
- the object to validate, ornull
.
-
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, ornull
.- Since:
- 3.1
-
-