Package mil.nga.mgrs.features
Class GridLine
- java.lang.Object
-
- mil.nga.sf.Geometry
-
- mil.nga.sf.Curve
-
- mil.nga.sf.LineString
-
- mil.nga.sf.Line
-
- mil.nga.grid.features.Line
-
- mil.nga.mgrs.features.GridLine
-
- All Implemented Interfaces:
Serializable
public class GridLine extends Line
Line between two points- Author:
- wnewman, osbornb
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GridLine(Line line)
ConstructorGridLine(Line line, GridType gridType)
ConstructorGridLine(Point point1, Point point2)
ConstructorGridLine(Point point1, Point point2, GridType gridType)
ConstructorGridLine(GridLine line)
Copy Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GridLine
copy()
Copy the lineboolean
equals(Object obj)
GridType
getGridType()
Get the line grid typeboolean
hasGridType()
Check if the line has a grid typeint
hashCode()
static GridLine
line(Line line)
Create a linestatic GridLine
line(Line line, GridType gridType)
Create a linestatic GridLine
line(Point point1, Point point2)
Create a linestatic GridLine
line(Point point1, Point point2, GridType gridType)
Create a linestatic GridLine
line(GridLine line)
Copy a linevoid
setGridType(GridType gridType)
Set the line grid type-
Methods inherited from class mil.nga.grid.features.Line
getPoint1, getPoint2, getUnit, intersection, isDegrees, isMeters, isUnit, setPoint1, setPoint2, setPoints, toDegrees, toMeters, toUnit
-
Methods inherited from class mil.nga.sf.LineString
addPoint, addPoints, endPoint, getPoint, getPoints, 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
-
GridLine
public GridLine(Point point1, Point point2)
Constructor- Parameters:
point1
- first pointpoint2
- second point
-
GridLine
public GridLine(Point point1, Point point2, GridType gridType)
Constructor- Parameters:
point1
- first pointpoint2
- second pointgridType
- line grid type
-
GridLine
public GridLine(Line line)
Constructor- Parameters:
line
- line to copy
-
GridLine
public GridLine(Line line, GridType gridType)
Constructor- Parameters:
line
- line to copygridType
- line grid type
-
GridLine
public GridLine(GridLine line)
Copy Constructor- Parameters:
line
- line to copy
-
-
Method Detail
-
line
public static GridLine line(Point point1, Point point2)
Create a line- Parameters:
point1
- first pointpoint2
- second point- Returns:
- line
-
line
public static GridLine line(Point point1, Point point2, GridType gridType)
Create a line- Parameters:
point1
- first pointpoint2
- second pointgridType
- line grid type- Returns:
- line
-
line
public static GridLine line(Line line)
Create a line- Parameters:
line
- line to copy- Returns:
- line
-
line
public static GridLine line(Line line, GridType gridType)
Create a line- Parameters:
line
- line to copygridType
- line grid type- Returns:
- line
-
line
public static GridLine line(GridLine line)
Copy a line- Parameters:
line
- line to copy- Returns:
- line
-
getGridType
public GridType getGridType()
Get the line grid type- Returns:
- grid type
-
hasGridType
public boolean hasGridType()
Check if the line has a grid type- Returns:
- true if has grid type
-
setGridType
public void setGridType(GridType gridType)
Set the line grid type- Parameters:
gridType
- grid type
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classLineString
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classLineString
-
-