public class IteratedNoder extends java.lang.Object implements Noder
NodedSegmentStrings completely.
The set of segment strings is fully noded;
i.e. noding is repeated until no further
intersections are detected.
Iterated noding using a FLOATING precision model is not guaranteed to converge, due to roundoff error. This problem is detected and an exception is thrown. Clients can choose to rerun the noding using a lower precision model.
| Modifier and Type | Field and Description |
|---|---|
private LineIntersector |
li |
static int |
MAX_ITER |
private int |
maxIter |
private java.util.Collection |
nodedSegStrings |
private PrecisionModel |
pm |
| Constructor and Description |
|---|
IteratedNoder(PrecisionModel pm) |
| Modifier and Type | Method and Description |
|---|---|
void |
computeNodes(java.util.Collection segStrings)
Fully nodes a list of
SegmentStrings, i.e. |
java.util.Collection |
getNodedSubstrings()
Returns a
Collection of fully noded SegmentStrings. |
private void |
node(java.util.Collection segStrings,
int[] numInteriorIntersections)
Node the input segment strings once
and create the split edges between the nodes
|
void |
setMaximumIterations(int maxIter)
Sets the maximum number of noding iterations performed before
the noding is aborted.
|
public static final int MAX_ITER
private PrecisionModel pm
private LineIntersector li
private java.util.Collection nodedSegStrings
private int maxIter
public IteratedNoder(PrecisionModel pm)
public void setMaximumIterations(int maxIter)
maxIter - the maximum number of iterations to performpublic java.util.Collection getNodedSubstrings()
NoderCollection of fully noded SegmentStrings.
The SegmentStrings have the same context as their parent.getNodedSubstrings in interface Noderpublic void computeNodes(java.util.Collection segStrings)
throws TopologyException
SegmentStrings, i.e. performs noding iteratively
until no intersections are found between segments.
Maintains labelling of edges correctly through
the noding.computeNodes in interface NodersegStrings - a collection of SegmentStrings to be nodedTopologyException - if the iterated noding fails to converge.private void node(java.util.Collection segStrings,
int[] numInteriorIntersections)