Smoothing Lines in a List of Points

1095
3
12-02-2011 06:22 AM
GregEdwards
New Contributor
We are receiving a list of points, and adding them to a map layer as a polyline. Using ESRI tools, how might we convert the line segment into a smoothed line segment using Bezier Spline or an equivalent?

Thank you.
-Greg Edwards

The code looks something like this:

var pointCollection = new Geometry.PointCollection();

//IN LOOP:

pointCollection.Add(Transform.GeographicToWebMercator(new MapPoint(latitude, longitude)));


//AFTER LOOP IS COMPLETED:

var polyline = new Polyline();
polyline.Paths.Add(pointCollection);
polylineList.Add(polyline);
0 Kudos
3 Replies
WeifengHe
Occasional Contributor II
You can cast the polyline into IPolycurve, then call Smooth method to convert into a smooth curve that containing only Beizer curve segments.
0 Kudos
GregEdwards
New Contributor
Which ArcGIS DLL and Namespace is the IPolycurve interface located? Thank you.
0 Kudos
BKuiper
Occasional Contributor III
0 Kudos