distance calculation usng lat and long in miles

From: <sunithab(at)travelpost(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: distance calculation usng lat and long in miles
Date: 2006-03-08 17:10:39
Message-ID: 005101c642d3$ef082960$1301a8c0@sf.vagabond.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have the lat and long data. I have created the geom column based on the
lat and long data as below.

UPDATE property SET geom =GeometryFromText('POINT(' || long ||
' ' || lat || ')',4326);

Now I have the geom columns in two tables

I am calculating the distance as below

select distance(geom1, geom2)* 69.055

It seems to be right. But I want to make sure.

Thanks for help in advance.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message sunithab 2006-03-08 17:15:37
Previous Message Eduardo Muñoz 2006-03-08 16:59:36 Problem with Transaction