Package com.luciad.ais.geodesy
Class TLcdEllipsoidRoundUtil
java.lang.Object
com.luciad.ais.geodesy.TLcdEllipsoidRoundUtil
Utility class to search roundings between paths.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
findCenterPoint
(ILcdPoint aStartPoint, double aAzimuth, boolean aTurnLeft, ILcdPoint aCircleCenterPoint, double aCircleRadius, double aRadius, ILcdEllipsoid aEllipsoid, double aAbsoluteTolerance, boolean aFindCenterOutsideCircle, double aMaxDistance, ILcd2DEditablePoint aCenterPointSFCT) Searches the center point of a circle with a given radius touching a line segment and circle.void
findCenterPoint
(ILcdPoint aStartPoint, double aAzimuth, boolean aTurnLeft, ILcdPoint aCircleCenterPoint, double aCircleRadius, double aRadius, ILcdEllipsoid aEllipsoid, double aAbsoluteTolerance, boolean aFindCenterOutsideCircle, ILcd2DEditablePoint aCenterPointSFCT) Searches the center point of a circle with a given radius touching a line segment and circle.void
findCenterPoint
(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, double aRadius, ILcdEllipsoid aEllipsoid, double aAbsoluteTolerance, ILcd2DEditablePoint aCircleCenterSFCT) Searches the center point of a circle with a given radius touching the two line segments aP1-aP2 and aP2-aP3.double
findCenterPointOfTouchingCircle
(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, boolean aMaximalRadius, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aCircleCenterSFCT) Searches the center point of a circle touching the line segment aP1-aP2 , touching the line segment aP2-aP3 , containing at least one of aP1 or aP2 , and with maximal possible radius if aMaximalRadius is true, with minimal possible radius if aMaximalRadius is false.void
findTangentialThroughPoint
(ILcdPoint aPoint, ILcdPoint aCenter, double aRadius, boolean aClockwise, ILcdEllipsoid aEllipsoid, double aAbsoluteTolerance, ILcd2DEditablePoint aTangentialPointSFCT) Find the point where a line through the given point aPoint is tangential to the given circle.
-
Constructor Details
-
TLcdEllipsoidRoundUtil
public TLcdEllipsoidRoundUtil()
-
-
Method Details
-
findCenterPoint
public void findCenterPoint(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, double aRadius, ILcdEllipsoid aEllipsoid, double aAbsoluteTolerance, ILcd2DEditablePoint aCircleCenterSFCT) throws IllegalArgumentException Searches the center point of a circle with a given radius touching the two line segments aP1-aP2 and aP2-aP3.- Parameters:
aP1
- the start point of the first line segment.aP2
- the end point of the first line segment which is the start point of the second line segment.aP3
- the end point of the second line segment.aRadius
- the radius of the touching circle.aEllipsoid
- the ellipsoid on which the line segments are defined.aAbsoluteTolerance
- the allowed tolerance for the result. The value may be 0.0 to cause the method to find a solution as accurate as possible.aCircleCenterSFCT
- the center of the touching circle as side effect.- Throws:
IllegalArgumentException
- if there is no circle center such that the touching points would be on the respective line segments.
-
findCenterPointOfTouchingCircle
public double findCenterPointOfTouchingCircle(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, boolean aMaximalRadius, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aCircleCenterSFCT) throws IllegalArgumentException Searches the center point of a circle- touching the line segment aP1-aP2 ,
- touching the line segment aP2-aP3 ,
- containing at least one of aP1 or aP2 , and
- with maximal possible radius if aMaximalRadius is true, with minimal possible radius if aMaximalRadius is false.
- Parameters:
aP1
- the start point of the first line segment.aP2
- the end point of the first line segment which is the start point of the second line segment.aP3
- the end point of the second line segment.aMaximalRadius
- indicates to want the maximal or minimal radius.aEllipsoid
- the ellipsoid on which the line segments are defined.aCircleCenterSFCT
- the center of the touching circle as side effect.- Returns:
- The radius of the circle.
- Throws:
IllegalArgumentException
- if there is no circle center as specified.
-
findCenterPoint
public void findCenterPoint(ILcdPoint aStartPoint, double aAzimuth, boolean aTurnLeft, ILcdPoint aCircleCenterPoint, double aCircleRadius, double aRadius, ILcdEllipsoid aEllipsoid, double aAbsoluteTolerance, boolean aFindCenterOutsideCircle, double aMaxDistance, ILcd2DEditablePoint aCenterPointSFCT) throws IllegalArgumentException Searches the center point of a circle with a given radius touching a line segment and circle.- Parameters:
aStartPoint
- start point of the geodesic line.aAzimuth
- the forward azimuth of the geodesic line.aTurnLeft
- whether a turn left will be made, right otherwise.aCircleCenterPoint
- center point of the circle to be touched.aCircleRadius
- radius of the circle to be touched, expressed in metersaRadius
- radius of the touching circle.aEllipsoid
- the ellipsoidal approximation of the earth.aAbsoluteTolerance
- the allowed tolerance for the result (meters). The value may be 0.0 to cause the method to find a solution as accurate as possible.aFindCenterOutsideCircle
- specifies whether the center point to be computed must lie inside the given circle (true) or outside (false)aMaxDistance
- the maximum distance between the start point and the calculated pointaCenterPointSFCT
- the center of the touching circle as side effect.- Throws:
IllegalArgumentException
- if there is no circle center such that the touching points would be on the respective line segment and circle, respecting the aFindCenterOutsideCircle flag.
-
findCenterPoint
public void findCenterPoint(ILcdPoint aStartPoint, double aAzimuth, boolean aTurnLeft, ILcdPoint aCircleCenterPoint, double aCircleRadius, double aRadius, ILcdEllipsoid aEllipsoid, double aAbsoluteTolerance, boolean aFindCenterOutsideCircle, ILcd2DEditablePoint aCenterPointSFCT) throws IllegalArgumentException Searches the center point of a circle with a given radius touching a line segment and circle.- Parameters:
aStartPoint
- start point of the geodesic line.aAzimuth
- the forward azimuth of the geodesic line.aTurnLeft
- whether a turn left will be made, right otherwise.aCircleCenterPoint
- center point of the circle to be touched.aCircleRadius
- radius of the circle to be touched, expressed in metersaRadius
- radius of the touching circle.aEllipsoid
- the ellipsoidal approximation of the earth.aAbsoluteTolerance
- the allowed tolerance for the result (meters). The value may be 0.0 to cause the method to find a solution as accurate as possible.aFindCenterOutsideCircle
- specifies whether the center point to be computed must lie inside the given circle (true) or outside (false)aCenterPointSFCT
- the center of the touching circle as side effect.- Throws:
IllegalArgumentException
- if there is no circle center such that the touching points would be on the respective line segment and circle, respecting the aFindCenterOutsideCircle flag.
-
findTangentialThroughPoint
public void findTangentialThroughPoint(ILcdPoint aPoint, ILcdPoint aCenter, double aRadius, boolean aClockwise, ILcdEllipsoid aEllipsoid, double aAbsoluteTolerance, ILcd2DEditablePoint aTangentialPointSFCT) throws IllegalArgumentException Find the point where a line through the given point aPoint is tangential to the given circle. This point is uniquely defined because we only look in a 90-degree range, starting from the direction from the center of the circle to the given point. On which side of this direction to look is defined by theaClockwise
parameter.- Parameters:
aPoint
- Given point outside of circle.aCenter
- Center of given circle.aRadius
- Radius of the given circle.aClockwise
- Look in clockwise direction starting from direction to aPointaEllipsoid
- the ellipsoid on which calculations are performed.aAbsoluteTolerance
- the allowed tolerance for the result. The value may be 0.0 to cause the method to find a solution as accurate as possible.aTangentialPointSFCT
- The resulting point, if found.- Throws:
IllegalArgumentException
- if there is no circle center such that the touching points would be on the respective line segments.
-