Class PositionalAccuracyConstant

All Implemented Interfaces:
Serializable, Emptiable, LenientComparable, IdentifiedObject, org.opengis.metadata.quality.AbsoluteExternalPositionalAccuracy, org.opengis.metadata.quality.Element, org.opengis.metadata.quality.PositionalAccuracy

public final class PositionalAccuracyConstant extends DefaultAbsoluteExternalPositionalAccuracy
Pre-defined positional accuracy resulting from some coordinate operations.
Since:
0.5
Version:
1.1
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serial number for inter-operability with different versions.
      See Also:
    • UNKNOWN_ACCURACY

      public static final double UNKNOWN_ACCURACY
      Presumed worst case error when no datum shift information was found. The highest value found in the EPSG database 6.7 is 999 metres (worst datum shift), so this error should be yet higher. I have seen 3 kilometres mentioned in some documentation somewhere.

      If this value is modified, please update getLinearAccuracy() public javadoc accordingly.

      See Also:
    • DATUM_SHIFT_ACCURACY

      private static final double DATUM_SHIFT_ACCURACY
      Default accuracy of datum shift, if not explicitly provided in the EPSG database. The 25 meters value is the next highest value (after 999 metres) found in the EPSG database version 6.7 for a significant number of transformations.

      If this value is modified, please update getLinearAccuracy() public javadoc accordingly.

      See Also:
    • INDIRECT_SHIFT_ACCURACY

      public static final double INDIRECT_SHIFT_ACCURACY
      Default accuracy of datum shifts when using an intermediate datum (typically WGS 84). Since this is a concatenation of two datum shifts, we use twice DATUM_SHIFT_ACCURACY. The result is multiplied by 2 again as a margin because we have no guarantees that the domain of validity of the two datum are close enough for making this concatenation valid.
      See Also:
    • DATUM_SHIFT_APPLIED

      public static final org.opengis.metadata.quality.PositionalAccuracy DATUM_SHIFT_APPLIED
      Indicates that a transformation requires a datum shift and some method has been applied. Datum shift methods often use Bursa Wolf parameters, but other kind of method may have been applied as well.
    • DATUM_SHIFT_OMITTED

      public static final org.opengis.metadata.quality.PositionalAccuracy DATUM_SHIFT_OMITTED
      Indicates that a transformation requires a datum shift, but no method has been found applicable. This usually means that no Bursa Wolf parameters have been found. Such datum shifts are approximations and may have 1 kilometer error.
    • INDIRECT_SHIFT_APPLIED

      public static final org.opengis.metadata.quality.PositionalAccuracy INDIRECT_SHIFT_APPLIED
      Indicates that a transformation requires a datum shift, but only an indirect method has been found. The indirect method uses an intermediate datum, typically WGS 84.
  • Constructor Details

    • PositionalAccuracyConstant

      private PositionalAccuracyConstant(org.opengis.util.InternationalString measureDescription, org.opengis.util.InternationalString evaluationMethodDescription, boolean pass)
      Creates an positional accuracy initialized to the given result.
  • Method Details

    • readResolve

      private Object readResolve() throws ObjectStreamException
      Invoked on deserialization. Replace this instance by one of the constants, if applicable.
      Returns:
      the object to use after deserialization.
      Throws:
      ObjectStreamException - if the serialized object defines an unknown data type.
    • getLinearAccuracy

      public static double getLinearAccuracy(org.opengis.referencing.operation.CoordinateOperation operation)
      Convenience method returning the accuracy in meters for the specified operation. This method tries each of the following procedures and returns the first successful one:
      • If at least one QuantitativeResult is found with a linear unit, then the largest accuracy estimate is converted to metres and returned.
      • Otherwise, if the operation is a Conversion, then returns 0 since a conversion is by definition accurate up to rounding errors.
      • Otherwise, if the operation is a Transformation, then checks if the datum shift were applied with the help of Bursa-Wolf parameters. This procedure looks for SIS-specific DATUM_SHIFT_APPLIED and DATUM_SHIFT_OMITTED constants.
      • Otherwise, if the operation is a ConcatenatedOperation, returns the sum of the accuracy of all components. This is a conservative scenario where we assume that errors cumulate linearly. Note that this is not necessarily the "worst case" scenario since the accuracy could be worst if the math transforms are highly non-linear.
      If the above is modified, please update AbstractCoordinateOperation.getLinearAccuracy() javadoc.
      Parameters:
      operation - the operation to inspect for accuracy.
      Returns:
      the accuracy estimate (always in meters), or NaN if unknown.
      See Also: