Get coordinates from polygon outline with greatest distance

I'm looking into a task in ArcGIS 10.2 of which I need to discover the two points on a polygon outline where they would be at the greatest distance from each other.

I have looked at ET Geowizards center-line (then extract end nodes) but it doesn't work as the polygon being so narrow seems to confuse ET so the centerline doesn't reach the "tips".

See the image below, the orange dots indicate the points I need. The polygons are always this shape, i.e. long, slim geomtries I would need to do this for 500 or so polygons so I need something fairly quick. I looked at using the near tool to loop through a point set for each polygon but it takes too long due to multiple calls of the GP tool.

My other thought is, using Python, use the geometery object to go through a point set for each polygon looping through all the possible pairings of vertices to find the pair that are the furthest distance.

Any thoughts?

I have full licenses of ET, ArcGIS Advanced and Spatial Analyst. Also can do a Python or .NET solution.

Many thanks

• How about get MBG and then loop through vertices to find ones that touch the boundary of the MBG polygon (should be very few) and algebraically calculate which are farthest apart (or use near function). All can be done in Python. Aug 4 '14 at 15:49
• Open-source solutions are discussed at gis.stackexchange.com/questions/1885/…. @Barbarossa: good idea, but you have to choose the MBG wisely. Rectangles and circles do not work: the convex hull is needed. That requires O(nlog(n)) effort to find and then the "algebraic calculation" could cost up to O(n^2). There are much faster algorithms: the diameter (furthest distance between any two points) of a simple polygon can be found in *linear time. See Preparata & Shamos, Computational Geometry (1985), Corollary 4.2. Aug 4 '14 at 20:29