Package org.apache.sis.referencing
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
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
FieldsModifier and TypeFieldDescriptionprivate final doubleThe final (f) coordinates and derivatives, together with geodesic and loxodromic distances.private final intGeodeticCalculator.validityflags at the timePathBuilderis instantiated.private final doubleThe final (f) coordinates and derivatives, together with geodesic and loxodromic distances.private final doubleThe final (f) coordinates and derivatives, together with geodesic and loxodromic distances.private final doubleThe final (f) coordinates and derivatives, together with geodesic and loxodromic distances.private final doubleAngular tolerance at equator in degrees.private final doubleThe final (f) coordinates and derivatives, together with geodesic and loxodromic distances.private final doubleThe final (f) coordinates and derivatives, together with geodesic and loxodromic distances. -
Constructor Summary
ConstructorsConstructorDescriptionPathBuilder(double εx) Creates a builder for the given tolerance at equator in metres. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidevaluateAt(double t) Invoked for computing a new point on the Bézier curve.(package private) final voidImplementation ofevaluateAt(double)using the current φ₂, λ₂ and ∂φ₂/∂λ₂ values.(package private) voidreset()Restores the enclosingGeodeticCalculatorto the state that it has atPathBuilderinstantiation time.
-
Field Details
-
mcosαf
private final double mcosαfThe final (f) coordinates and derivatives, together with geodesic and loxodromic distances. Saved for later restoration byreset(). -
msinαf
private final double msinαfThe final (f) coordinates and derivatives, together with geodesic and loxodromic distances. Saved for later restoration byreset(). -
φf
private final double φfThe final (f) coordinates and derivatives, together with geodesic and loxodromic distances. Saved for later restoration byreset(). -
λf
private final double λfThe final (f) coordinates and derivatives, together with geodesic and loxodromic distances. Saved for later restoration byreset(). -
distance
private final double distanceThe final (f) coordinates and derivatives, together with geodesic and loxodromic distances. Saved for later restoration byreset(). -
length
private final double lengthThe final (f) coordinates and derivatives, together with geodesic and loxodromic distances. Saved for later restoration byreset(). -
flags
private final int flagsGeodeticCalculator.validityflags at the timePathBuilderis instantiated. Saved for later restoration byreset(). -
tolerance
private final double toleranceAngular 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 theBezier.pointarray and the derivative (∂y/∂x) in the dx and dy fields.- Specified by:
evaluateAtin classBezier- 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.TransformExceptionImplementation ofevaluateAt(double)using the current φ₂, λ₂ and ∂φ₂/∂λ₂ values. This method stores the projected coordinates in theBezier.pointarray and stores the derivative ∂y/∂x in theBezier.dx,Bezier.dyfields.- Throws:
org.opengis.referencing.operation.TransformException
-
reset
void reset()Restores the enclosingGeodeticCalculatorto the state that it has atPathBuilderinstantiation time.
-