Package mil.nga.sf
Class Line
- java.lang.Object
-
- mil.nga.sf.Geometry
-
- mil.nga.sf.Curve
-
- mil.nga.sf.LineString
-
- mil.nga.sf.Line
-
- All Implemented Interfaces:
Serializable
public class Line extends LineString
A LineString with exactly 2 Points.- Author:
- osbornb
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Geometrycopy()Copy the geometryvoidsetPoints(List<Point> points)Set the points-
Methods inherited from class mil.nga.sf.LineString
addPoint, addPoints, endPoint, equals, getPoint, getPoints, hashCode, isEmpty, isSimple, numPoints, startPoint
-
Methods inherited from class mil.nga.sf.Geometry
expandEnvelope, getCentroid, getDegreesCentroid, getDimension, getEnvelope, getGeometryType, hasM, hasZ, is3D, isMeasured, setHasM, setHasZ, updateZM
-
-
-
-
Constructor Detail
-
Line
public Line()
Constructor
-
Line
public Line(boolean hasZ, boolean hasM)Constructor- Parameters:
hasZ- has zhasM- has m
-
Line
public Line(Point point1, Point point2)
Constructor- Parameters:
point1- first pointpoint2- second point- Since:
- 2.2.0
-
Line
public Line(Line line)
Copy Constructor- Parameters:
line- line to copy
-
-
Method Detail
-
setPoints
public void setPoints(List<Point> points)
Set the points- Overrides:
setPointsin classLineString- Parameters:
points- points
-
copy
public Geometry copy()
Copy the geometry- Overrides:
copyin classLineString- Returns:
- geometry copy
-
-