Uses the Douglas Peucker algorithm to reduce the number of points.

Namespace:  EGIS.ShapeFileLib
Assembly:  EGIS.ShapeFileLib (in EGIS.ShapeFileLib.dll)

Syntax

Visual Basic
Public Shared Function SimplifyDouglasPeucker ( _
	inputPoints As PointD(), _
	reducedPointIndicies As List(Of Integer), _
	inputPointCount As Integer, _
	tolerance As Double _
) As Integer
C#
public static int SimplifyDouglasPeucker(
	PointD[] inputPoints,
	List<int> reducedPointIndicies,
	int inputPointCount,
	double tolerance
)
Visual C++
public:
static int SimplifyDouglasPeucker(
	array<PointD>^ inputPoints, 
	List<int>^ reducedPointIndicies, 
	int inputPointCount, 
	double tolerance
)
JavaScript
EGIS.ShapeFileLib.GeometryAlgorithms.simplifyDouglasPeucker = function(inputPoints, reducedPointIndicies, inputPointCount, tolerance);

Parameters

inputPoints
Type: array<EGIS.ShapeFileLib..::..PointD>[]()[][]
The input points to be reduced
reducedPointIndicies
Type: System.Collections.Generic..::..List<(Of <(<'Int32>)>)>
List to populate the indices of the points in the simplified polyline
inputPointCount
Type: System..::..Int32
The number of points in inputPoints
tolerance
Type: System..::..Double
the tolerance before discarding points - see DP algorithm for explanation

Return Value

number of reduced points

See Also