Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've got two point shapefiles (A and B) that represent features all over the world, and I'm using Near (Analysis Tools-Proximity). I'm trying to calculate the distances between the points in layer A and layer B and I'm not obtaining the correct distance values. What projection system should I use?


share|improve this question
Before we get into projections, how are you currently calculating your distances? are you using the Haversine formula for great circle calculations or straight-line (I presume these are large distances since you mention global data)? –  MappaGnosis Feb 13 at 16:49
This all depends on which sort of distance you are trying to compute. Read this answer. –  Luís de Sousa Feb 13 at 18:42
@LuísdeSousa It would be very unusual to use loxodromes for any such application. Although they have potential merit for short and medium-distance maritime travel, in that case one would have to pay attention to the shapes of oceans, ruling out the O.P.'s approach altogether. Moreover, by using projected coordinates (even in a Mercator projection), the software will produce really awful errors whenever it compares two points that should be connected across the antimeridian of the projection. –  whuber Feb 13 at 19:35
whuber, loxodromes are used in many applications, anything related to navigation. Issues with the antimeridian are software limitations. –  Luís de Sousa Feb 13 at 21:30
@LuísdeSousa If you believe this question might be about maritime applications, then the appropriate course of action to take is to post a comment asking the O.P. whether that is the case. When you make a recommendation based on an unstated assumption, you risk creating confusion among them and among future readers. –  whuber Feb 13 at 22:20
show 1 more comment

1 Answer

The answer is "None".

It is not possible to create a projection of the world which preserve the scale in all direction from any point of the world.

The cylindrical equidistant projection, you only have true distance along the meridians and along the equator. So if your points don't have the same longitude, you get it wrong.

With an azimuthal equidistant projection, you would need to center it on every point from layer in order to have true distance.

So, my recommendation is to use Python in order to get your "great circle" distance. You can see this post based on the geopy package. First you compute the geographic coordinates of your points (calculate geometry), then you measure your distances in a loop.

share|improve this answer
+1. Some comments: (a) All azimuthal equidistant projections cover the entire sphere except for one point (in a spherical model) or a very small set of points (in an ellipsoidal model). Do not be fooled by limitations (artificially) built into certain popular GIS software! (b) Using the Cylindrical Equidistant projection (aka Equirectangular, Plate Carree, or "geographic") is nevertheless really bad unless all points are near the Equator and lie within a common hemisphere. This reinforces the wisdom of your recommendation. –  whuber Feb 13 at 19:31
Thanks @whuber for these useful comments. I've update my answer to remove the limitation of the azimuthal equidistant projection and to clarify the risks of using cylindrical. –  radouxju Feb 13 at 19:42
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.