Class LineBuilder
- java.lang.Object
-
- org.locationtech.jts.operation.overlay.LineBuilder
-
public class LineBuilder extends java.lang.ObjectForms JTS LineStrings out of a the graph ofDirectedEdges created by anOverlayOp.- Version:
- 1.7
-
-
Field Summary
Fields Modifier and Type Field Description private GeometryFactorygeometryFactoryprivate java.util.ListlineEdgesListprivate OverlayOpopprivate PointLocatorptLocatorprivate java.util.ListresultLineList
-
Constructor Summary
Constructors Constructor Description LineBuilder(OverlayOp op, GeometryFactory geometryFactory, PointLocator ptLocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Listbuild(int opCode)private voidbuildLines(int opCode)private voidcollectBoundaryTouchEdge(DirectedEdge de, int opCode, java.util.List edges)Collect edges from Area inputs which should be in the result but which have not been included in a result area.private voidcollectLineEdge(DirectedEdge de, int opCode, java.util.List edges)Collect line edges which are in the result.private voidcollectLines(int opCode)private voidfindCoveredLineEdges()Find and mark L edges which are "covered" by the result area (if any).private voidlabelIsolatedLine(Edge e, int targetIndex)Label an isolated node with its relationship to the target geometry.private voidlabelIsolatedLines(java.util.List edgesList)
-
-
-
Field Detail
-
op
private OverlayOp op
-
geometryFactory
private GeometryFactory geometryFactory
-
ptLocator
private PointLocator ptLocator
-
lineEdgesList
private java.util.List lineEdgesList
-
resultLineList
private java.util.List resultLineList
-
-
Constructor Detail
-
LineBuilder
public LineBuilder(OverlayOp op, GeometryFactory geometryFactory, PointLocator ptLocator)
-
-
Method Detail
-
build
public java.util.List build(int opCode)
- 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
private void collectLineEdge(DirectedEdge de, int opCode, java.util.List edges)
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
private void collectBoundaryTouchEdge(DirectedEdge de, int opCode, java.util.List edges)
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
private void labelIsolatedLines(java.util.List edgesList)
-
labelIsolatedLine
private void labelIsolatedLine(Edge e, int targetIndex)
Label an isolated node with its relationship to the target geometry.
-
-