Class PointBuilder
- java.lang.Object
-
- org.locationtech.jts.operation.overlay.PointBuilder
-
public class PointBuilder extends java.lang.Object
ConstructsPoint
s from the nodes of an overlay graph.- Version:
- 1.7
-
-
Field Summary
Fields Modifier and Type Field Description private GeometryFactory
geometryFactory
private OverlayOp
op
private java.util.List
resultPointList
-
Constructor Summary
Constructors Constructor Description PointBuilder(OverlayOp op, GeometryFactory geometryFactory, PointLocator ptLocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List
build(int opCode)
Computes the Point geometries which will appear in the result, given the specified overlay operation.private void
extractNonCoveredResultNodes(int opCode)
Determines nodes which are in the result, and createsPoint
s for them.private void
filterCoveredNodeToPoint(Node n)
Converts non-covered nodes to Point objects and adds them to the result.
-
-
-
Field Detail
-
op
private OverlayOp op
-
geometryFactory
private GeometryFactory geometryFactory
-
resultPointList
private java.util.List resultPointList
-
-
Constructor Detail
-
PointBuilder
public PointBuilder(OverlayOp op, GeometryFactory geometryFactory, PointLocator ptLocator)
-
-
Method Detail
-
build
public java.util.List build(int opCode)
Computes the Point geometries which will appear in the result, given the specified overlay operation.- Returns:
- a list of the Points objects in the result
-
extractNonCoveredResultNodes
private void extractNonCoveredResultNodes(int opCode)
Determines nodes which are in the result, and createsPoint
s for them. This method determines nodes which are candidates for the result via their labelling and their graph topology.- Parameters:
opCode
- the overlay operation
-
filterCoveredNodeToPoint
private void filterCoveredNodeToPoint(Node n)
Converts non-covered nodes to Point objects and adds them to the result. A node is covered if it is contained in another element Geometry with higher dimension (e.g. a node point might be contained in a polygon, in which case the point can be eliminated from the result).- Parameters:
n
- the node to test
-
-