| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
package org.locationtech.jts.operation.relate; |
| 16 |
|
| 17 |
import java.util.Iterator; |
| 18 |
|
| 19 |
import org.locationtech.jts.geom.IntersectionMatrix; |
| 20 |
import org.locationtech.jts.geomgraph.EdgeEnd; |
| 21 |
import org.locationtech.jts.geomgraph.EdgeEndStar; |
| 22 |
|
| 23 |
/** |
| 24 |
* An ordered list of {@link EdgeEndBundle}s around a {@link RelateNode}. |
| 25 |
* They are maintained in CCW order (starting with the positive x-axis) around the node |
| 26 |
* for efficient lookup and topology building. |
| 27 |
* |
| 28 |
* @version 1.7 |
| 29 |
*/ |
| 30 |
public class EdgeEndBundleStar |
| 31 |
extends EdgeEndStar |
| 32 |
{ |
| 33 |
/** |
| 34 |
* Creates a new empty EdgeEndBundleStar |
| 35 |
*/ |
| 36 |
public EdgeEndBundleStar() { |
| 37 |
} |
| 38 |
|
| 39 |
/** |
| 40 |
* Insert a EdgeEnd in order in the list. |
| 41 |
* If there is an existing EdgeStubBundle which is parallel, the EdgeEnd is |
| 42 |
* added to the bundle. Otherwise, a new EdgeEndBundle is created |
| 43 |
* to contain the EdgeEnd. |
| 44 |
* <br> |
| 45 |
*/ |
| 46 |
public void insert(EdgeEnd e) |
| 47 |
{ |
| 48 |
EdgeEndBundle eb = (EdgeEndBundle) edgeMap.get(e); |
| 49 |
if (eb == null) { |
| 50 |
eb = new EdgeEndBundle(e); |
| 51 |
insertEdgeEnd(e, eb); |
| 52 |
} |
| 53 |
else { |
| 54 |
eb.insert(e); |
| 55 |
} |
| 56 |
} |
| 57 |
|
| 58 |
/** |
| 59 |
* Update the IM with the contribution for the EdgeStubs around the node. |
| 60 |
*/ |
| 61 |
void updateIM(IntersectionMatrix im) |
| 62 |
{ |
| 63 |
for (Iterator it = iterator(); it.hasNext(); ) { |
| 64 |
EdgeEndBundle esb = (EdgeEndBundle) it.next(); |
| 65 |
esb.updateIM(im); |
| 66 |
} |
| 67 |
} |
| 68 |
|
| 69 |
} |
| 70 |
|