public class RelateComputer
extends java.lang.Object
RelateComputer does not need to build a complete graph structure to compute the IntersectionMatrix. The relationship between the geometries can be computed by simply examining the labelling of edges incident on each node.
RelateComputer does not currently support arbitrary GeometryCollections. This is because GeometryCollections can contain overlapping Polygons. In order to correct compute relate on overlapping Polygons, they would first need to be noded and merged (if not explicitly, at least implicitly).
Modifier and Type | Field and Description |
---|---|
private GeometryGraph[] |
arg |
private IntersectionMatrix |
im |
private Coordinate |
invalidPoint |
private java.util.ArrayList |
isolatedEdges |
private LineIntersector |
li |
private NodeMap |
nodes |
private PointLocator |
ptLocator |
Constructor and Description |
---|
RelateComputer(GeometryGraph[] arg) |
Modifier and Type | Method and Description |
---|---|
private void |
computeDisjointIM(IntersectionMatrix im)
If the Geometries are disjoint, we need to enter their dimension and
boundary dimension in the Ext rows in the IM
|
IntersectionMatrix |
computeIM() |
private void |
computeIntersectionNodes(int argIndex)
Insert nodes for all intersections on the edges of a Geometry.
|
private void |
computeProperIntersectionIM(SegmentIntersector intersector,
IntersectionMatrix im) |
private void |
copyNodesAndLabels(int argIndex)
Copy all nodes from an arg geometry into this graph.
|
private void |
insertEdgeEnds(java.util.List ee) |
private void |
labelIntersectionNodes(int argIndex)
For all intersections on the edges of a Geometry,
label the corresponding node IF it doesn't already have a label.
|
private void |
labelIsolatedEdge(Edge e,
int targetIndex,
Geometry target)
Label an isolated edge of a graph with its relationship to the target geometry.
|
private void |
labelIsolatedEdges(int thisIndex,
int targetIndex)
Processes isolated edges by computing their labelling and adding them
to the isolated edges list.
|
private void |
labelIsolatedNode(Node n,
int targetIndex)
Label an isolated node with its relationship to the target geometry.
|
private void |
labelIsolatedNodes()
Isolated nodes are nodes whose labels are incomplete
(e.g.
|
private void |
labelNodeEdges() |
private void |
updateIM(IntersectionMatrix im)
update the IM with the sum of the IMs for each component
|
private LineIntersector li
private PointLocator ptLocator
private GeometryGraph[] arg
private NodeMap nodes
private IntersectionMatrix im
private java.util.ArrayList isolatedEdges
private Coordinate invalidPoint
public RelateComputer(GeometryGraph[] arg)
public IntersectionMatrix computeIM()
private void insertEdgeEnds(java.util.List ee)
private void computeProperIntersectionIM(SegmentIntersector intersector, IntersectionMatrix im)
private void copyNodesAndLabels(int argIndex)
private void computeIntersectionNodes(int argIndex)
private void labelIntersectionNodes(int argIndex)
private void computeDisjointIM(IntersectionMatrix im)
private void labelNodeEdges()
private void updateIM(IntersectionMatrix im)
private void labelIsolatedEdges(int thisIndex, int targetIndex)
private void labelIsolatedEdge(Edge e, int targetIndex, Geometry target)
private void labelIsolatedNodes()
private void labelIsolatedNode(Node n, int targetIndex)