Re: earthdistance

From: Dann Corbit <DCorbit(at)connx(dot)com>
To: 'Olivier Chaussavoine' <olivier(dot)chaussavoine(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: earthdistance
Date: 2013-08-10 09:08:33
Message-ID: 87F42982BF2B434F831FCEF4C45FC33E64F3444C@EXCHANGE.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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:
https://trac.osgeo.org/proj/
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(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Olivier Chaussavoine
Sent: Friday, August 9, 2013 12:30 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] earthdistance

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.
What would need to be done to adapt the circle type to a new type 'spherical cap' that would allow simple geographic indexing?

--
Olivier Chaussavoine

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2013-08-10 09:11:18 Re: Need Help
Previous Message Luca Ferrari 2013-08-10 09:00:14 Re: Recovery.conf and PITR