findOrderedDuplicates Method

For each subset of k successive points within tolerance of the first point in the subset, return the indices of the last k-1 duplicates.

  • Index 0 is never returned.

findOrderedDuplicates(tolerance: numberGeometry.smallMetricDistance, preserveLast: booleanfalse): number[]

@returns ordered array of 0-based indices of duplicate points

Parameter Type Description
tolerance number optional distance tol for compression (default smallMetricDistance)
preserveLast boolean if the last k < this.length points of the instance are duplicates, whether to return the
indices of the first k-1 duplicates for this last run. If true, index this.length - 1 is not returned
unless all points are duplicates, in which case all indices but 0 are returned. Default value is false.

Returns - number[]

ordered array of 0-based indices of duplicate points

Defined in

Last Updated: 18 January, 2025