Convex hull of (longitude, latitude)-points on the surface of a sphere?

Standard convex hull algorithms are not defeated by the wrapping-around of the coordinates on the surface of the Earth but by a more fundamental problem. The surface of a sphere (let's forget the not-quite-sphericity of the Earth) is not a Euclidean space so Euclidean geometry doesn't work, and convex hull routines which assume that the underlying space is Euclidean (show me one which doesn't, please) won't work.

Up vote 3 down vote favorite 1 share g+ share fb share tw.

Standard convex hull algorithms will not work with (longitude, latitude)-points, because standard algorithms assume you want the hull of a set of Cartesian points. Latitude-longitude points are not Cartesian, because longitude "wraps around" at the anti-meridian (+/- 180 degrees). I.e.

, two degrees east of longitude 179 is -179. So if your set of points happens to straddle the anti-meridian, you will compute spurious hulls that stretch all the way around the world incorrectly. Any suggestions for tricks I could apply with a standard convex hull algorithm to correct for this, or pointers to proper "geospherical" hull algorithms?

Now that I think on it, there are more interesting cases to consider than straddling the anti-merdian. Consider a "band" of points that encircle the earth -- its convex hull would have no east/west bounds. Or even further, what is the convex hull of {(0,0), (0, 90), (0, -90), (90, 0), (-90, 0), (180, 0)}?

-- it would seem to contain the entire surface of the earth, so which points are on its perimeter? Geometry geospatial latitude-longitude computational-geometry convex-hull link|improve this question asked Mar 13 at 5:02Maxy-B384212 100% accept rate.

1 +1 for a great, thought-provoking question. – Li-aung Yip Mar 13 at 5:33 See here: stackoverflow.com/a/9612324/817828 – TreyA Mar 13 at 12:07.

Standard convex hull algorithms are not defeated by the wrapping-around of the coordinates on the surface of the Earth but by a more fundamental problem. The surface of a sphere (let's forget the not-quite-sphericity of the Earth) is not a Euclidean space so Euclidean geometry doesn't work, and convex hull routines which assume that the underlying space is Euclidean (show me one which doesn't, please) won't work. The surface of the sphere conforms to the concepts of an elliptic geometry where lines are great circles and antipodal points are considered the same point.

You've already started to experience the issues arising from trying to apply a Euclidean concept of convexity to an elliptic space. One approach open to you would be to adopt the definitions of geodesic convexity and implement a geodesic convex hull routine. That looks quite hairy.

And it may not produce results which conform to your (generally Euclidean) expectations. In many cases, for 3 arbitrary points, the convex hull turns out to be the entire surface of the sphere. Another approach, one adopted by navigators and cartographers through the ages, would be to project part of the surface of the sphere (a part containing all your points) into Euclidean space (which is the subject of map projections and I won't bother you with references to the extensive literature thereon) and to figure out the convex hull of the projected points.

Project the area you are interested in onto the plane and adjust the coordinates so that they do not wrap around; for example, if you were interested in France you might adjust all longitudes by adding 30deg so that the whole country was coordinated by +ve numbers. While I'm writing, the idea proposed in @Li-aung Yip's answer, of using a 3D convex hull algorithm, strikes me as misguided. The 3D convex hull of the set of surface points will include points, edges and faces which lie inside the sphere.

These literally do not exist on the 2D surface of the sphere and only change your difficulties from wrestling with the not-quite-right concept in 2D to quite-wrong in 3D. Further, I learned from the Wikipedia article I referenced that a closed hemisphere (ie one which includes its 'equator') is not convex in the geometry of the surface of the sphere.

1 I mainly suggested the application of a 3D convex hull algorithm as food for thought. If the OP can provide more information about the data he's trying to use (points within one country? The list of all capital cities around the world?

) then that might help. – Li-aung Yip Mar 13 at 9:52 Thanks for a great answer. Geodesic convexity is very interesting, as are other generalizations of convexity to non-euclidean contexts.

For my immediate needs, though, applying some simple linear transformations to the latitude/longitude points so that they never span the anti-meridian is sufficient. – Maxy-B Mar 19 at 15:49.

You may be able to then find the 2D convex hull you desire by analysing the 3D convex hull. This returns you to well-travelled algorithms for cartesian convex hulls (albeit in three dimensions) and has no issues with wrap around of the coordinates. Alternately, there's this paper: Computing the Convex Hull of a Simple Polygon on the Sphere (1996) which seems to deal with some of the same issues that you're dealing with (coordinate wrap-around, etc.).

Thanks for the link to the PDF, though it looks like it's an abstract of a talk (the PDF itself) rather than a full paper. – Maxy-B Mar 13 at 6:11 Regarding the 3D hull idea -- because the 3D points all (by definition) lie on the surface of a sphere, won't they all be included in the resulting 3D convex hull, no matter where they are? Such a hull wouldn't contribute any information.

– Maxy-B Mar 13 at 6:14 2 Yes, all the points will be part of the convex hull - but consider that the 3D convex hull may have a particular shape (i.e. A hemisphere. ) Finding the set of points on the 'edge' of the hemisphere might be useful.

– Li-aung Yip Mar 13 at 6:24.

You may be able to then find the 2D convex hull you desire by analysing the 3D convex hull.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions