Class DouglasPeuckerLineSimplifier
Simplifies a line (sequence of points) using the standard Douglas-Peucker algorithm.
Inherited Members
Namespace: NetTopologySuite.Simplify
Assembly: NetTopologySuite.dll
Syntax
public class DouglasPeuckerLineSimplifier
Constructors
| Edit this page View SourceDouglasPeuckerLineSimplifier(Coordinate[])
Creates an instance of this class using the provided pts array of coordinates
Declaration
public DouglasPeuckerLineSimplifier(Coordinate[] pts)
Parameters
| Type | Name | Description |
|---|---|---|
| Coordinate[] | pts | An array of coordinates |
Properties
| Edit this page View SourceDistanceTolerance
The distance tolerance for the simplification.
Declaration
public double DistanceTolerance { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
PreserveEndpoint
Gets a flag indicating if the endpoint should be preserved
Declaration
public bool PreserveEndpoint { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceSimplify()
Declaration
public Coordinate[] Simplify()
Returns
| Type | Description |
|---|---|
| Coordinate[] |
Simplify(Coordinate[], double)
Simplifies a series of Coordinates. The series' endpoints are preserved.
Declaration
public static Coordinate[] Simplify(Coordinate[] pts, double distanceTolerance)
Parameters
| Type | Name | Description |
|---|---|---|
| Coordinate[] | pts | The series of |
| double | distanceTolerance | A simplification tolerance distance |
Returns
| Type | Description |
|---|---|
| Coordinate[] | The simplified series of |
Simplify(Coordinate[], double, bool)
Simplifies a series of Coordinates.
Declaration
public static Coordinate[] Simplify(Coordinate[] pts, double distanceTolerance, bool isPreserveEndpoint)
Parameters
| Type | Name | Description |
|---|---|---|
| Coordinate[] | pts | The series of |
| double | distanceTolerance | A simplification tolerance distance |
| bool | isPreserveEndpoint | A flag indicating if the endpoint should be preserved |
Returns
| Type | Description |
|---|---|
| Coordinate[] |