JTS Core 1.17.1
Packages
Classes
Search
About
Top
Segment(double, double, double, double, double, double)
Segment(double, double, double, double, double, double, Object)
Segment(Coordinate, Coordinate, Object)
Segment(Coordinate, Coordinate)
getStart(): Coordinate
getEnd(): Coordinate
getStartX(): double
getStartY(): double
getStartZ(): double
getEndX(): double
getEndY(): double
getEndZ(): double
getLineSegment(): LineSegment
getData(): Object
setData(Object): void
equalsTopo(Segment): boolean
intersection(Segment): Coordinate
toString(): String
Bottom
Source
Classic
org.locationtech.jts.triangulate
Class Segment
Hierarchy:
Object
, Segment
public class Segment
Models a constraint segment in a triangulation. A constraint segment is an oriented straight line segment between a start point and an end point.
Authors:
David Skea
Martin Davis
public
Segment(double x1, double y1, double z1, double x2, double y2, double z2)
Creates a new instance for the given ordinates.
public
Segment(double x1, double y1, double z1, double x2, double y2, double z2,
Object
data)
Creates a new instance for the given ordinates, with associated external data.
public
Segment(
Coordinate
p0,
Coordinate
p1,
Object
data)
Creates a new instance for the given points, with associated external data.
Parameters:
p0 - p0 the start point
p1 - p1 the end point
data - data an external data object
public
Segment(
Coordinate
p0,
Coordinate
p1)
Creates a new instance for the given points.
Parameters:
p0 - p0 the start point
p1 - p1 the end point
public
Coordinate
getStart()
Gets the start coordinate of the segment
Returns:
a Coordinate
public
Coordinate
getEnd()
Gets the end coordinate of the segment
Returns:
a Coordinate
public
double getStartX()
Gets the start X ordinate of the segment
Returns:
the X ordinate value
public
double getStartY()
Gets the start Y ordinate of the segment
Returns:
the Y ordinate value
public
double getStartZ()
Gets the start Z ordinate of the segment
Returns:
the Z ordinate value
public
double getEndX()
Gets the end X ordinate of the segment
Returns:
the X ordinate value
public
double getEndY()
Gets the end Y ordinate of the segment
Returns:
the Y ordinate value
public
double getEndZ()
Gets the end Z ordinate of the segment
Returns:
the Z ordinate value
public
LineSegment
getLineSegment()
Gets a
LineSegment
modelling this segment.
Returns:
a LineSegment
public
Object
getData()
Gets the external data associated with this segment
Returns:
a data object
public
void setData(
Object
data)
Sets the external data to be associated with this segment
Parameters:
data - data a data object
public
boolean equalsTopo(
Segment
s)
Determines whether two segments are topologically equal. I.e. equal up to orientation.
Parameters:
s - s a segment
Returns:
true if the segments are topologically equal
public
Coordinate
intersection(
Segment
s)
Computes the intersection point between this segment and another one.
Parameters:
s - s a segment
Returns:
the intersection point, or
null
if there is none
public
String
toString()
Computes a string representation of this segment.
Returns:
a string