I have a number of points that are positioned representing a polygon. I need to convert the points to a polygon or line but the features are not sequential and the OIDs are mixed up. Using Python, how can I create a polygon or line from these points, essentially reordering them so they are sequential in a e.g. clockwise direction? Sort doesn't do the job and calculating the bearing to a mean position of all points won't work for concave or complex polygons.

