Class SubgraphDepthLocater
- java.lang.Object
-
- org.locationtech.jts.operation.buffer.SubgraphDepthLocater
-
class SubgraphDepthLocater extends java.lang.Object
Locates a subgraph inside a set of subgraphs, in order to determine the outside depth of the subgraph. The input subgraphs are assumed to have had depths already calculated for their edges.- Version:
- 1.7
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
SubgraphDepthLocater.DepthSegment
A segment from a directed edge which has been assigned a depth value for its sides.
-
Field Summary
Fields Modifier and Type Field Description private LineSegment
seg
private java.util.Collection
subgraphs
-
Constructor Summary
Constructors Constructor Description SubgraphDepthLocater(java.util.List subgraphs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.List
findStabbedSegments(Coordinate stabbingRayLeftPt)
Finds all non-horizontal segments intersecting the stabbing line.private void
findStabbedSegments(Coordinate stabbingRayLeftPt, java.util.List dirEdges, java.util.List stabbedSegments)
Finds all non-horizontal segments intersecting the stabbing line in the list of dirEdges.private void
findStabbedSegments(Coordinate stabbingRayLeftPt, DirectedEdge dirEdge, java.util.List stabbedSegments)
Finds all non-horizontal segments intersecting the stabbing line in the input dirEdge.int
getDepth(Coordinate p)
-
-
-
Field Detail
-
subgraphs
private java.util.Collection subgraphs
-
seg
private LineSegment seg
-
-
Method Detail
-
getDepth
public int getDepth(Coordinate p)
-
findStabbedSegments
private java.util.List findStabbedSegments(Coordinate stabbingRayLeftPt)
Finds all non-horizontal segments intersecting the stabbing line. The stabbing line is the ray to the right of stabbingRayLeftPt.- Parameters:
stabbingRayLeftPt
- the left-hand origin of the stabbing line- Returns:
- a List of
DepthSegments
intersecting the stabbing line
-
findStabbedSegments
private void findStabbedSegments(Coordinate stabbingRayLeftPt, java.util.List dirEdges, java.util.List stabbedSegments)
Finds all non-horizontal segments intersecting the stabbing line in the list of dirEdges. The stabbing line is the ray to the right of stabbingRayLeftPt.- Parameters:
stabbingRayLeftPt
- the left-hand origin of the stabbing linestabbedSegments
- the current list ofDepthSegments
intersecting the stabbing line
-
findStabbedSegments
private void findStabbedSegments(Coordinate stabbingRayLeftPt, DirectedEdge dirEdge, java.util.List stabbedSegments)
Finds all non-horizontal segments intersecting the stabbing line in the input dirEdge. The stabbing line is the ray to the right of stabbingRayLeftPt.- Parameters:
stabbingRayLeftPt
- the left-hand origin of the stabbing linestabbedSegments
- the current list ofDepthSegments
intersecting the stabbing line
-
-