How can I find the farthest point from a set of existing points?

I have a set of points as a shapefile and I want to find (the coordinates) of a new point which will have the longest possible distance from each of the existing points. Is that possible? If yes, is there any sample VB code?

• Do you mean you want a new point for each already-existing point, or one point that is somehow "farthest" from all of them? And by farthest, do you mean "the other side of the globe"? If so, you can just multiply the latitude by -1, and add 180 to the longitude (subtracting 360 if the resultant value is > 180) if you have them in decimal degrees. Commented Nov 29, 2011 at 14:43
• I think the interesting question would be: given existing points scattered across the globe, find a new point on the globe farthest from all existing points. Commented Nov 29, 2011 at 14:54
• It would, effectively be the point at the end of an isosceles triangle, at which the distance is limited only by how far out you wish to go. If I have read the question properly, you want the point furthest from both of them? Equally? Commented Nov 29, 2011 at 14:56
• Oh!My post created a fantastic discussion and material! NMpeterson:Firstly, I have to say that my points are within a small flat area; so no need for globe calculations. I am looking for the second issue raised; i.e.one point that is somehow "farthest" from all of the existing points. So, please focus on this. Commented Nov 29, 2011 at 20:13

Kirk Kuykendall's recommendation to construct a spherical Voronoi diagram (Thiessen polygons) is a good one, but might have some technical hitches to work out. In the meantime, as an alternative, one can apply the standard raster solution as described in another thread. Use spherical distances instead of Euclidean distances.

Here is an example using five points, here given as (lat, lon):

`````` 82.7051   -145.256
60.3321     81.2881
-17.076     105.125
-38.792    -122.686
0.000     180.000
``````

This spherical distance map spans the globe from -180 to 180 degrees longitude horizontally and -90 to 90 degrees latitude vertically. The points are shown with large red dots. The distances increase with brightness. The apparent ridges must be portions of great circles. The small black dot near (-15.3268, -2.04352) marks the point of maximum distance of 11,227 km. (Distances were computed in the ITRF00 ellipsoidal datum.)

The resolution of this grid is one degree. To get a more precise solution, one can zoom into such a point (and into any other local maximum with a sufficiently close value to the global maximum) and repeat the calculation on a smaller but higher-resolution grid.

• much prettier than vectors. Not sure why I thought rasters required a flat earth model. Commented Nov 29, 2011 at 18:15
• Pretty, yes, but inefficient. It would be nice to see the vector-based spherical Voronoi solution work out. Commented Nov 29, 2011 at 18:17
• @Whuber:How can you get automatically the coordinates of the black point?" Commented Dec 1, 2011 at 10:47
• @Demetris One way is to compute the maximum value on the grid, select all cells equal to that value, and use the coordinates of that cell's center. Commented Dec 1, 2011 at 15:46
• @Whuber: Many thanks. This is a good idea. However, I have to clip the output raster based on a feature class (a uniques polygon). Can I do this? Commented Dec 1, 2011 at 19:09

I've never tried this but it seems like this would work:

Create a 3D voronoi diagram of the sphere. This resulting polygons will be roughly centered on the original existing (seed) points.

Loop through each resulting vertex to find the one that is farthest from its closest existing point. This point should be the most remote point on the globe.

• This is a great idea (+1). But what does the spherical Voronoi diagram look like when all the points lie within a common hemisphere? The code you refer to obtains it with a convex hull, but it seems that will not work. Commented Nov 29, 2011 at 17:24
• hmm, yeah, I guess even if they aren't all in a common hemisphere there will be one polygon that lacks a seed point. What if you constructed a point for it by using the antipodal point of the convex hulls' centroid? Then, in addition to looping through each vertex, this convex-antipode-point would be examined to see if it is further from its neighbors than the max vertex distance. Commented Nov 29, 2011 at 17:42
• That was my initial thought, but the antipodal points will create artifactual polygons. Think about what would happen in your illustration if the antipode to every point were included, for instance! There's probably a solution of this nature, but it seems like it's not straightforward. Commented Nov 29, 2011 at 17:53

You could use a Cost-Weighted Distance Function to identify how far away every cell in your raster is from all other points.

• What cost would you use? Commented Nov 29, 2011 at 17:03
• If you set the cost to be one unit; you could identify what the furthest point would be based on distance.
– djq
Commented Nov 29, 2011 at 17:14
• @whuber Though perhaps this is no different to calculating the euclidean distance approach already mentioned.
– djq
Commented Nov 29, 2011 at 17:21
• That's Euclidean distance. Actually, it's not even that: it's a weird kind of octagonal distance (circles are actually octagons). In this situation (distances from points only, with no barriers), it's much more accurate and much faster to compute either a Euclidean distance or spherical distance grid directly, rather than trying to exploit CostDistance for this. Commented Nov 29, 2011 at 17:22
• I am not sure that cost weighted distance fucntion would help because I need the coordinates of just one point and I have an exsiting vector set of points;but I will try. Thanks. Commented Nov 29, 2011 at 20:17

As far as I know, this "Pole of Inaccessability" analysis has to be done iteratively.

An iterative raster approach would be appropriate as long as you are looking at a small area with minimal distortion from projection. For each cell, compute the distance to all points, then take the minimum distance. The cell with the highest value is the pole. You can also use Euclidean Distance in Spatial Analyst to accomplish this.

An iterative vector approach is more complicated. Garcia-Castellanos et al 2007 describe an iterative method based on a spherical earth. It appears that they have made their C code available online. I can imagine ways of doing this in Arc with buffers, but it would still iterative and slow.

you can use Point Distance (Analysis) The tool creates a table with distances between two sets of points. if the default search radius is used, distances from all input points to all near points are calculated. The output table can be quite large. For example, if both input and near features have 1,000 points each, then the output table can contain one million records.

• How can this be applied to finding the coordinates of a new point that does not appear in the input? Perhaps you have misread the question? Commented Aug 30, 2013 at 17:53

try getting the average distance of a new point(the point for which we need to check if it is farthest), to all the other points in the set, and among the new point,the point having maximum average distance is the farthest.

• -1 This is wrong. For example, consider a Euclidean equilateral triangle of unit radius. Within its interior, the center is the point of maximum distance to the triangle's vertices and therefore has 1 for its average distance. But the midpoint of any side lies at distances sqrt(3/4) from the side's vertices and distance 3/2 from the remaining vertex for an average distance of 1/2 + sqrt(1/3) = 1.07735, which is greater than 1. Because sufficiently small triangles on the sphere will be metrically close to the Euclidean triangle, this counterexample applies to spherical distances, too. Commented Sep 14, 2020 at 13:58
• can u please explain your reason in simple terms, I am not understanding ur argument. Commented Nov 29, 2020 at 3:07

The farthest point to your set of points would be the reciprocal to the most inner point in your set. For instance, if your most inner point in your set had coordinates 49 degrees North and -144 degrees East, then the reciprocal and the furthest point would have coordinates of 49 degrees South and 36 degrees West. This is not exactly true because Earth is not perfectly spherical, rather geoidal; therefore, the correctness of your result point a lot depends on what projection and geographic systems (orthographic, orthorectified ...) you use. It could be helpful to find a reciprocal for entire set (transfer an antipode for a set) and then run surface analysis within terrain covered by the antipode set of points, since terrain may very. I assume your question is not about any points on extraterrestrial bodies, such as other planets, or moons. Sorry, I do not have VB code for you. 🙄

• The point the furthest from all other points in a set would be the most inner one ( one that is the furthest from all most outer points along the edge), it would still be the closest to every point immediately next to it nomatter what. This is cluster analysis, not fun. It is probably better to look into the same charge atoms in Physics.😐 Commented Dec 31, 2016 at 8:20