Class Molodensky.Ellipsoid

All Implemented Interfaces:
Serializable, Formattable, Deprecable, LenientComparable, org.opengis.referencing.datum.Ellipsoid, org.opengis.referencing.IdentifiedObject
Enclosing class:
Molodensky

private static final class Molodensky.Ellipsoid extends DefaultEllipsoid
A temporary ellipsoid used only for passing arguments to the MolodenskyTransform constructor. The intent is to use the Δa and Δf values explicitly specified in the EPSG parameters if available, or to compute them only if no Δa or Δf values where specified.
  • Field Details

    • Δa

      private double Δa
      The EPSG parameter values, or NaN if unspecified.
    • Δf

      private double Δf
      The EPSG parameter values, or NaN if unspecified.
    • other

      The ellipsoid for which Δa and Δf are valid.
  • Constructor Details

    • Ellipsoid

      Ellipsoid(Map<String,?> name, double a, double b, double Δa, double Δf)
      Creates a new temporary ellipsoid with explicitly provided Δa and Δf values.
  • Method Details

    • computeDifferences

      void computeDifferences(Parameters values)
      Computes Δa and Δf now if not already done and tries to store the result in the given parameters. The parameters are set in order to complete them when the user specified the OGC parameters (axis lengths) and not the EPSG ones (axis and flattening differences).
    • setIfPresent

      private static void setIfPresent(Parameters values, org.opengis.parameter.ParameterDescriptor<Double> parameter, double value, javax.measure.Unit<?> unit)
      Tries to set the given parameter value. This method should be invoked only when completing parameters without explicit values. This approach completes the work done in DefaultMathTransformFactory, which already completed the src_semi_major, src_semi_minor, tgt_semi_major and tgt_semi_minor parameters.
      Parameters:
      values - the group in which to set the parameter values.
      parameter - descriptor of the parameter to set.
      value - the new value.
      unit - unit of measurement for the new value.
    • semiMajorAxisDifference

      public double semiMajorAxisDifference(org.opengis.referencing.datum.Ellipsoid target)
      Returns Δa as specified in the parameters if possible, or compute it otherwise.
      Overrides:
      semiMajorAxisDifference in class DefaultEllipsoid
      Parameters:
      target - the other ellipsoid from which to get semi-major axis length difference.
      Returns:
      (other ellipsoid semi-major axis) - (this ellipsoid semi-major axis).
    • flatteningDifference

      public double flatteningDifference(org.opengis.referencing.datum.Ellipsoid target)
      Returns Δf as specified in the parameters if possible, or compute it otherwise.
      Overrides:
      flatteningDifference in class DefaultEllipsoid
      Parameters:
      target - the other ellipsoid from which to get flattening difference.
      Returns:
      (other ellipsoid flattening) - (this ellipsoid flattening).