Package org.locationtech.jts.geomgraph
Class EdgeIntersection
java.lang.Object
org.locationtech.jts.geomgraph.EdgeIntersection
- All Implemented Interfaces:
Comparable
Represents a point on an
edge which intersects with another edge.
The intersection may either be a single point, or a line segment (in which case this point is the start of the line segment) The intersection point must be precise.
- Version:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionPoint of intersectiondouble
Edge distance of this point along the containing line segmentint
Index of the containing line segment in the parent edge -
Constructor Summary
ConstructorsConstructorDescriptionEdgeIntersection
(Coordinate coord, int segmentIndex, double dist) EdgeIntersection. -
Method Summary
Modifier and TypeMethodDescriptionint
compare
(int segmentIndex, double dist) Comparison with segment and distance.int
double
int
boolean
isEndPoint
(int maxSegmentIndex) void
print
(PrintStream out) toString()
-
Field Details
-
coord
Point of intersection -
segmentIndex
public int segmentIndexIndex of the containing line segment in the parent edge -
dist
public double distEdge distance of this point along the containing line segment
-
-
Constructor Details
-
EdgeIntersection
EdgeIntersection.- Parameters:
coord
- Point of intersectionsegmentIndex
- Index of the containing line segment in the parent edgedist
- Edge distance of this point along the containing line segment
-
-
Method Details
-
getCoordinate
-
getSegmentIndex
public int getSegmentIndex() -
getDistance
public double getDistance() -
compareTo
- Specified by:
compareTo
in interfaceComparable
-
compare
public int compare(int segmentIndex, double dist) Comparison with segment and distance.- Parameters:
segmentIndex
- index of the containing line segmentdist
- dge distance of this point along the containing line segment- Returns:
1
this EdgeIntersection is located before the argument location,0
this EdgeIntersection is at the argument location,1
this EdgeIntersection is located after the argument location
-
isEndPoint
public boolean isEndPoint(int maxSegmentIndex) -
print
-
toString
-