On 1/16/2014 1:52 AM, itishree sukla wrote:
we have Database, but not ready for Geocode use. what i understood from different blog, we should have latitude and longitude either based on addresses, or postal code we have. However if I will get the lat and long, need to calculate earth distance to give location based on user location. Formula i got, is calculating shortest distance, which always not true practically. Please address my concern, how i will get rid of these issues.
for determining closest proximity, you probably don't need accurate spherical earth distance, simple cartesian distance is good enough as you're only interested in relative values. for this, you can use the built in postgresql POINT data type, and the <-> distance operator.
-- john r pierce 37N 122W somewhere on the middle of the left coast -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general