We received a kml file with polygons but the points are not in a logical sequence and we end up with strange overlapping shapes that are supposed to be an open polygon. We did identify a point near the center and found the azimuth and then sorted in that order and it helped but still did not solve. The bounds of the polygon do contain convex sides. Is anyone aware of an approach to process the random points and get the best open polygon? We have considered calculating bearing and distance from each point and looking for non intersecting line segments but wanted to see if there is a better approach.
We are using php to calculate and then pass into mapping api.. our database is mysql.
Trying to do as minimal programming as possible.