Package com.luciad.geometries
Class Line
java.lang.Object
com.luciad.geometries.Geometry
com.luciad.geometries.Curve
com.luciad.geometries.Line
- All Implemented Interfaces:
AutoCloseable
Represents a line.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLine
(Coordinate startPoint, Coordinate endPoint, LineInterpolationType interpolationType, CoordinateReference reference) Creates a line segment. -
Method Summary
Methods inherited from class com.luciad.geometries.Curve
computePoint, getLength2D
Methods inherited from class com.luciad.geometries.Geometry
getBounds, getReference
-
Constructor Details
-
Line
-
Line
public Line(@NotNull Coordinate startPoint, @NotNull Coordinate endPoint, @NotNull LineInterpolationType interpolationType, @NotNull CoordinateReference reference) throws IllegalArgumentException Creates a line segment.Line
objects can be created with the interpolation types:- linear
- geodesic
- rhumb
The interpolation types geodesic and rhumb are only allowed for geodetic coordinate references.
- Parameters:
startPoint
- the start point of the lineendPoint
- the end point of the lineinterpolationType
- the interpolation typereference
- the reference of the line- Throws:
IllegalArgumentException
- if the line cannot be constructed. For example for an invalid combination of coordinate reference and interpolation type.- Since:
- 2025.0
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classCurve
-
getStartPoint
Returns the start point of the line segment.- Returns:
- the start point of the line segment.
-
getEndPoint
Returns the end point of the line segment.- Returns:
- the end point of the line segment.
-
getInterpolationType
Returns the interpolation type of the line segment.One of
- LineInterpolationType::geodesic
- LineInterpolationType::rhumb
- LineInterpolationType::linear
- Returns:
- the interpolation type of the line segment.
-