Class GeodeticCalculator.PathBuilder

java.lang.Object
org.apache.sis.internal.referencing.j2d.Bezier
org.apache.sis.referencing.GeodeticCalculator.PathBuilder
Direct Known Subclasses:
GeodeticCalculator.CircularPath
Enclosing class:
GeodeticCalculator

private class GeodeticCalculator.PathBuilder extends Bezier
Builds a geodesic path as a sequence of Bézier curves. The start point and end points are the points in enclosing GeodeticCalculator at the time this class is instantiated. The start coordinates given by GeodeticCalculator.φ1 and GeodeticCalculator.λ1 shall never change for this whole builder lifetime. However, the end coordinates (GeodeticCalculator.φ2, GeodeticCalculator.λ2) will vary at each step.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final double
    The final (f) coordinates and derivatives, together with geodesic and loxodromic distances.
    private final int
    GeodeticCalculator.validity flags at the time PathBuilder is instantiated.
    private final double
    The final (f) coordinates and derivatives, together with geodesic and loxodromic distances.
    private final double
    The final (f) coordinates and derivatives, together with geodesic and loxodromic distances.
    private final double
    The final (f) coordinates and derivatives, together with geodesic and loxodromic distances.
    private final double
    Angular tolerance at equator in degrees.
    private final double
    The final (f) coordinates and derivatives, together with geodesic and loxodromic distances.
    private final double
    The final (f) coordinates and derivatives, together with geodesic and loxodromic distances.

    Fields inherited from class org.apache.sis.internal.referencing.j2d.Bezier

    depth, dx, dy, forceCubic, point, εx, εy
  • Constructor Summary

    Constructors
    Constructor
    Description
    PathBuilder(double εx)
    Creates a builder for the given tolerance at equator in metres.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    evaluateAt(double t)
    Invoked for computing a new point on the Bézier curve.
    (package private) final void
    Implementation of evaluateAt(double) using the current φ₂, λ₂ and ∂φ₂/∂λ₂ values.
    (package private) void
    Restores the enclosing GeodeticCalculator to the state that it has at PathBuilder instantiation time.

    Methods inherited from class org.apache.sis.internal.referencing.j2d.Bezier

    build

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • mcosαf

      private final double mcosαf
      The final (f) coordinates and derivatives, together with geodesic and loxodromic distances. Saved for later restoration by reset().
    • msinαf

      private final double msinαf
      The final (f) coordinates and derivatives, together with geodesic and loxodromic distances. Saved for later restoration by reset().
    • φf

      private final double φf
      The final (f) coordinates and derivatives, together with geodesic and loxodromic distances. Saved for later restoration by reset().
    • λf

      private final double λf
      The final (f) coordinates and derivatives, together with geodesic and loxodromic distances. Saved for later restoration by reset().
    • distance

      private final double distance
      The final (f) coordinates and derivatives, together with geodesic and loxodromic distances. Saved for later restoration by reset().
    • length

      private final double length
      The final (f) coordinates and derivatives, together with geodesic and loxodromic distances. Saved for later restoration by reset().
    • flags

      private final int flags
      GeodeticCalculator.validity flags at the time PathBuilder is instantiated. Saved for later restoration by reset().
    • tolerance

      private final double tolerance
      Angular tolerance at equator in degrees.
  • Constructor Details

    • PathBuilder

      PathBuilder(double εx)
      Creates a builder for the given tolerance at equator in metres.
  • Method Details

    • evaluateAt

      protected void evaluateAt(double t) throws org.opengis.referencing.operation.TransformException
      Invoked for computing a new point on the Bézier curve. This method is invoked with a t value varying from 0 (start point) to 1 (end point) inclusive. This method stores the coordinates in the Bezier.point array and the derivative (∂y/∂x) in the dx and dy fields.
      Specified by:
      evaluateAt in class Bezier
      Parameters:
      t - desired point on the curve, from 0 (start point) to 1 (end point) inclusive.
      Throws:
      org.opengis.referencing.operation.TransformException - if the point coordinates cannot be computed.
    • evaluateAtEndPoint

      final void evaluateAtEndPoint() throws org.opengis.referencing.operation.TransformException
      Implementation of evaluateAt(double) using the current φ₂, λ₂ and ∂φ₂/∂λ₂ values. This method stores the projected coordinates in the Bezier.point array and stores the derivative ∂y/∂x in the Bezier.dx, Bezier.dy fields.
      Throws:
      org.opengis.referencing.operation.TransformException
    • reset

      void reset()
      Restores the enclosing GeodeticCalculator to the state that it has at PathBuilder instantiation time.