Creating a polygon from an unordered set of points
I have the contour of the shoreline of a lake. I have measured data points away from the lake shore signifying a particular depth. The data is not ordered as a polygon and hence trying to draw it creates a series of lines all over the place. I would like to turn the points into a ordered set that results in a smooth polygon.
I have tried a "nearest point" approach. An example is shown here: http://www.deepcreekanswers.com/samples/sampledata.png.
I've tried a closest perpendicular distance to the shoreline polygon elements approach. But it's worse.
Re: Creating a polygon from an unordered set of points
Estimate the center of the polygon with the mean of the x coords and
the mean of the y coords.
Calculate the angle of each point from that center point using the
sort the data by the angle calculated.
This will not be perfect if you have inlets and peninsulas, but would
at least get you started and those points could be adjusted by hand or
by an algorithm that looks for crossings/self-intersections and
reverses the order of the points that cause the cross.