Package com.luciad.geodesy
Class LineIntersection
java.lang.Object
com.luciad.geodesy.LineIntersection
- All Implemented Interfaces:
AutoCloseable
The result of a line intersection.
If an intersection exists, this can either be a single point, or a line segment.
- Since:
- 2025.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The type of intersection. -
Constructor Summary
ConstructorsConstructorDescriptionLineIntersection
(Coordinate point) Creates a line intersection result that consists of a single point.LineIntersection
(Line lineSegment) Creates a line intersection result that consists of a line segment. -
Method Summary
-
Constructor Details
-
LineIntersection
Creates a line intersection result that consists of a single point.- Parameters:
point
- the intersection point
-
LineIntersection
Creates a line intersection result that consists of a line segment.- Parameters:
lineSegment
- the line segment that forms the intersection
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
getType
Returns the intersection type.This can either be a single point, or a line segment.
- Returns:
- the intersection type.
-
getPoint
Returns the single intersection point.- Returns:
- the single intersection point.
- Throws:
IllegalStateException
- whenLineIntersection#getType
returns a value other thanPoint
-
getLineSegment
Returns the line segment that forms the intersection.- Returns:
- the line segment that forms the intersection.
- Throws:
IllegalStateException
- whenLineIntersection#getType
returns a value other than LineSegment
-