public class SnappingNoder extends Object implements Noder
The snap tolerance should be chosen to be as small as possible while still producing a correct result. It probably only needs to be small enough to eliminate "nearly-coincident" segments, for which intersection points cannot be computed accurately. This implies a factor of about 10e-12 smaller than the magnitude of the segment coordinates.
With an appropriate snap tolerance this algorithm appears to be very robust. So far no failure cases have been found, given a small enough snap tolerance.
The correctness of the output is not verified by this noder.
If required this can be done by ValidatingNoder.
| Constructor and Description |
|---|
SnappingNoder(double snapTolerance)
Creates a snapping noder using the given snap distance tolerance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
computeNodes(Collection inputSegStrings)
Computes the noding for a collection of
SegmentStrings. |
Collection |
getNodedSubstrings()
Returns a
Collection of fully noded SegmentStrings. |
public SnappingNoder(double snapTolerance)
snapTolerance - points are snapped if within this distancepublic Collection getNodedSubstrings()
NoderCollection of fully noded SegmentStrings.
The SegmentStrings have the same context as their parent.getNodedSubstrings in interface Noderpublic void computeNodes(Collection inputSegStrings)
NoderSegmentStrings.
Some Noders may add all these nodes to the input SegmentStrings;
others may only add some or none at all.computeNodes in interface NoderinputSegStrings - a Collection of SegmentStringsCopyright © 2022. All rights reserved.