com.vividsolutions.jts.noding.snapround
Class SegmentSnapper

java.lang.Object
  extended bycom.vividsolutions.jts.noding.snapround.SegmentSnapper

public class SegmentSnapper
extends java.lang.Object

Version:
1.4.0

Constructor Summary
SegmentSnapper()
           
 
Method Summary
 boolean addSnappedNode(Coordinate snapPt, SegmentString segStr, int segIndex)
          Adds a new node (equal to the snap pt) to the segment if the snapPt is within tolerance of the segment
static boolean isWithinTolerance(Coordinate p, Coordinate p0, Coordinate p1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SegmentSnapper

public SegmentSnapper()
Method Detail

isWithinTolerance

public static boolean isWithinTolerance(Coordinate p,
                                        Coordinate p0,
                                        Coordinate p1)
Returns:
true if the point p is within the snap tolerance of the line p0-p1

addSnappedNode

public boolean addSnappedNode(Coordinate snapPt,
                              SegmentString segStr,
                              int segIndex)
Adds a new node (equal to the snap pt) to the segment if the snapPt is within tolerance of the segment

Parameters:
snapPt -
segStr -
segIndex -
Returns:
true if a node was added