To calculate geographic distances, a great circle route calculation is used. This is not the same thing as the simple calculation for distances between two
points on a sphere. In order to perform the calculation, various model parameters must be chosen, such as the ellipsoidal reference model. To see examples of how this calculation is performed, see the code from the project proj.4: I see that PostGIS uses proj.4, so if you have installed that package, you should be able to perform the calculations you wish to make. From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-owner@xxxxxxxxxxxxxx]
On Behalf Of Olivier Chaussavoine I develope a project openbarter that needs to match objects based on a maximum distance between their positions on earth. I saw that the documentation of the extension earthdistance was interesting, but the promise was not in the code.
It would be nice to have these functions available independently of sophisticated geographic systems. There is a circle object for flat two dimensional space, but earth deals with spherical caps. It would not be exact but enough to suppose that earth is a
sphere and that all dimensions latitude, longitude and distance are in radian. |