Class LineBuilder
java.lang.Object
org.locationtech.jts.operation.overlay.LineBuilder
Forms JTS LineStrings out of a the graph of
DirectedEdge
s
created by an OverlayOp
.- Version:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate GeometryFactory
private List
private OverlayOp
private PointLocator
private List
-
Constructor Summary
ConstructorsConstructorDescriptionLineBuilder
(OverlayOp op, GeometryFactory geometryFactory, PointLocator ptLocator) -
Method Summary
Modifier and TypeMethodDescriptionbuild
(int opCode) private void
buildLines
(int opCode) private void
collectBoundaryTouchEdge
(DirectedEdge de, int opCode, List edges) Collect edges from Area inputs which should be in the result but which have not been included in a result area.private void
collectLineEdge
(DirectedEdge de, int opCode, List edges) Collect line edges which are in the result.private void
collectLines
(int opCode) private void
Find and mark L edges which are "covered" by the result area (if any).private void
labelIsolatedLine
(Edge e, int targetIndex) Label an isolated node with its relationship to the target geometry.private void
labelIsolatedLines
(List edgesList)
-
Field Details
-
op
-
geometryFactory
-
ptLocator
-
lineEdgesList
-
resultLineList
-
-
Constructor Details
-
LineBuilder
-
-
Method Details
-
build
- Returns:
- a list of the LineStrings in the result of the specified overlay operation
-
findCoveredLineEdges
private void findCoveredLineEdges()Find and mark L edges which are "covered" by the result area (if any). L edges at nodes which also have A edges can be checked by checking their depth at that node. L edges at nodes which do not have A edges can be checked by doing a point-in-polygon test with the previously computed result areas. -
collectLines
private void collectLines(int opCode) -
collectLineEdge
Collect line edges which are in the result. Line edges are in the result if they are not part of an area boundary, if they are in the result of the overlay operation, and if they are not covered by a result area.- Parameters:
de
- the directed edge to testopCode
- the overlap operationedges
- the list of included line edges
-
collectBoundaryTouchEdge
Collect edges from Area inputs which should be in the result but which have not been included in a result area. This happens ONLY:- during an intersection when the boundaries of two areas touch in a line segment
- OR as a result of a dimensional collapse.
-
buildLines
private void buildLines(int opCode) -
labelIsolatedLines
-
labelIsolatedLine
Label an isolated node with its relationship to the target geometry.
-