Class SnappingPointIndex
An index providing fast creation and lookup of snap points.
Inherited Members
Namespace: NetTopologySuite.Noding.Snap
Assembly: NetTopologySuite.dll
Syntax
public sealed class SnappingPointIndex
Constructors
| Edit this page View SourceSnappingPointIndex(double)
Creates a snap point index using a specified distance tolerance.
Declaration
public SnappingPointIndex(double snapTolerance)
Parameters
Type | Name | Description |
---|---|---|
double | snapTolerance | Points are snapped if within this distance |
Properties
| Edit this page View SourceDepth
Gets a value indicating the depth of the tree
Declaration
public int Depth { get; }
Property Value
Type | Description |
---|---|
int |
Tolerance
Gets a value indicating the snapping tolerance value for the index
Declaration
public double Tolerance { get; }
Property Value
Type | Description |
---|---|
double |
Methods
| Edit this page View SourceSnap(Coordinate)
Snaps a coordinate to an existing snap point, if it is within the snap tolerance distance. Otherwise adds the coordinate to the snap point index.
Declaration
public Coordinate Snap(Coordinate p)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p | The point to snap |
Returns
Type | Description |
---|---|
Coordinate | The point it snapped to, or the input point |