com.vividsolutions.jts.operation.overlay.snap
public class LineStringSnapper extends java.lang.Object
LineString
to a set of target snap vertices.
A snapping distance tolerance is used to control where snapping is performed.Constructor and Description |
---|
LineStringSnapper(Coordinate[] srcPts,
double snapTolerance)
Creates a new snapper using the given points
as source points to be snapped.
|
LineStringSnapper(LineString srcLline,
double snapTolerance)
Creates a new snapper using the points in the given
LineString
as source snap points. |
Modifier and Type | Method and Description |
---|---|
Coordinate[] |
snapTo(Coordinate[] snapPts)
Snaps the vertices and segments of the source LineString
to the given set of target snap points.
|
public LineStringSnapper(LineString srcLline, double snapTolerance)
LineString
as source snap points.srcLline
- a LineString to snapsnapTolerance
- the snap tolerance to usepublic LineStringSnapper(Coordinate[] srcPts, double snapTolerance)
srcPts
- the points to snapsnapTolerance
- the snap tolerance to usepublic Coordinate[] snapTo(Coordinate[] snapPts)
snapPts
- the vertices to snap to