I have written a short class for radial distance simplifier that is somewhat similar to the interface the D-P simplifier is exposing.
The code is very simple and can be written better, but the idea is what's important here.
Feel free to use this code any way you want.
public class RadialDistanceSimplifier
{
private readonly IGeometry _geometry;
public double DistanceTolerance { get; set; }
public RadialDistanceSimplifier(IGeometry geometry)
{
_geometry = geometry;
}
public ILineString GetResultGeometry()
{
var coordinates = _geometry.Coordinates;
if (coordinates.Length == 0)
{
// throw?
return null;
}
var simplified = new List<Coordinate> {coordinates.First()};
foreach (var coordinate in coordinates.Skip(1))
{
if (coordinate.Distance(simplified.Last()) > DistanceTolerance)
{
simplified.Add(coordinate);
}
}
return simplified.Count <= 1 ? null : new LineString(simplified.ToArray());
}
}