| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
package org.locationtech.jts.operation.relate; |
| 16 |
|
| 17 |
import org.locationtech.jts.geom.Coordinate; |
| 18 |
import org.locationtech.jts.geom.IntersectionMatrix; |
| 19 |
import org.locationtech.jts.geomgraph.EdgeEndStar; |
| 20 |
import org.locationtech.jts.geomgraph.Node; |
| 21 |
|
| 22 |
/** |
| 23 |
* Represents a node in the topological graph used to compute spatial relationships. |
| 24 |
* |
| 25 |
* @version 1.7 |
| 26 |
*/ |
| 27 |
public class RelateNode |
| 28 |
extends Node |
| 29 |
{ |
| 30 |
|
| 31 |
public RelateNode(Coordinate coord, EdgeEndStar edges) |
| 32 |
{ |
| 33 |
super(coord, edges); |
| 34 |
} |
| 35 |
|
| 36 |
/** |
| 37 |
* Update the IM with the contribution for this component. |
| 38 |
* A component only contributes if it has a labelling for both parent geometries |
| 39 |
*/ |
| 40 |
protected void computeIM(IntersectionMatrix im) |
| 41 |
{ |
| 42 |
im.setAtLeastIfValid(label.getLocation(0), label.getLocation(1), 0); |
| 43 |
} |
| 44 |
/** |
| 45 |
* Update the IM with the contribution for the EdgeEnds incident on this node. |
| 46 |
*/ |
| 47 |
void updateIMFromEdges(IntersectionMatrix im) |
| 48 |
{ |
| 49 |
((EdgeEndBundleStar) edges).updateIM(im); |
| 50 |
} |
| 51 |
|
| 52 |
} |
| 53 |
|