Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.operation.overlay.snap
Class LineStringSnapper

    java.lang.Object
      com.vividsolutions.jts.operation.overlay.snap.LineStringSnapper

public class LineStringSnapper
extends java.lang.Object

Snaps the vertices and segments of a `LineString` to a set of target snap vertices. A snapping distance tolerance is used to control where snapping is performed.

Version:
  1.7
Author:
  Martin Davis

Constructor Summary
`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.

Method Summary
`Coordinate[]` | `snapTo(Coordinate[] snapPts)` Snaps the vertices and segments of the source LineString to the given set of target snap points.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LineStringSnapper

    public LineStringSnapper(LineString srcLline,
                             double snapTolerance)

  Creates a new snapper using the points in the given `LineString` as source snap points.

Parameters:
  `srcLline` - a LineString to snap
  `snapTolerance` - the snap tolerance to use

### LineStringSnapper

    public LineStringSnapper(Coordinate[] srcPts,
                             double snapTolerance)

  Creates a new snapper using the given points as source points to be snapped.

Parameters:
  `srcPts` - the points to snap
  `snapTolerance` - the snap tolerance to use

Method Detail

### snapTo

    public Coordinate[] snapTo(Coordinate[] snapPts)

  Snaps the vertices and segments of the source LineString to the given set of target snap points.

  Parameters:
    `snapPts` - the vertices to snap to
  Returns:
    a list of the snapped points

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD