Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am analyzing the accuracy of the STDistance function for geographical objects in SQL Server 2008, in order to understand its behaviour better I need to find the underlying formula.

Does anyone knows which formula is used in SQL Server, haversine?

share|improve this question
may be helpful for you… – Sunil Apr 22 '13 at 12:58
up vote 1 down vote accepted

Microsoft (due mostly to a lack of knowledge about geodesics) elected to define geographical distances along great ellipses and this is what STDistance on Geographic objects returns. For the formulas that are used see Kallay, Geometric algorithms on an ellipsoid earth model (2008), Also relevant is Kallay, Defining edges on a round earth (2007), (be warned that this paper contains several misstatements about geodesics).

share|improve this answer

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.