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 double
The final (f) coordinates and derivatives, together with geodesic and loxodromic distances.private final int
GeodeticCalculator.validity
flags at the timePathBuilder
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. -
Constructor Summary
ConstructorsConstructorDescriptionPathBuilder
(double εx) Creates a builder for the given tolerance at equator in metres. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
evaluateAt
(double t) Invoked for computing a new point on the Bézier curve.(package private) final void
Implementation ofevaluateAt(double)
using the current φ₂, λ₂ and ∂φ₂/∂λ₂ values.(package private) void
reset()
Restores the enclosingGeodeticCalculator
to the state that it has atPathBuilder
instantiation 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.validity
flags at the timePathBuilder
is 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.point
array and the derivative (∂y/∂x) in the dx and dy fields.- Specified by:
evaluateAt
in 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.point
array and stores the derivative ∂y/∂x in theBezier.dx
,Bezier.dy
fields.- Throws:
org.opengis.referencing.operation.TransformException
-
reset
void reset()Restores the enclosingGeodeticCalculator
to the state that it has atPathBuilder
instantiation time.
-