Class LineStringSnapper
Snaps the vertices and segments of a LineString to a set of target snap vertices. A snap distance tolerance is used to control where snapping is performed.
The implementation handles empty geometry and empty snap vertex sets.Inherited Members
Namespace: NetTopologySuite.Operation.Overlay.Snap
Assembly: NetTopologySuite.dll
Syntax
public class LineStringSnapper
Constructors
| Edit this page View SourceLineStringSnapper(Coordinate[], double)
Creates a new snapper using the given points as source points to be snapped.
Declaration
public LineStringSnapper(Coordinate[] srcPts, double snapTolerance)
Parameters
| Type | Name | Description |
|---|---|---|
| Coordinate[] | srcPts | |
| double | snapTolerance |
LineStringSnapper(LineString, double)
Creates a new snapper using the points in the given LineString as target snap points.
Declaration
public LineStringSnapper(LineString srcLine, double snapTolerance)
Parameters
| Type | Name | Description |
|---|---|---|
| LineString | srcLine | A LineString to snap (may be empty) |
| double | snapTolerance | the snap tolerance to use |
Properties
| Edit this page View SourceAllowSnappingToSourceVertices
Declaration
public bool AllowSnappingToSourceVertices { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceSnapTo(Coordinate[])
Snaps the vertices and segments of the source LineString to the given set of snap points.
Declaration
public Coordinate[] SnapTo(Coordinate[] snapPts)
Parameters
| Type | Name | Description |
|---|---|---|
| Coordinate[] | snapPts | the vertices to snap to |
Returns
| Type | Description |
|---|---|
| Coordinate[] | list of the snapped points |