From: | "Uwe C(dot) Schroeder" <uwe(at)oss4u(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | sunithab(at)travelpost(dot)com |
Subject: | Re: distance calculation usng lat and long in miles |
Date: | 2006-03-08 17:42:42 |
Message-ID: | 200603080942.43020.uwe@oss4u.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
There is the earthdistance package in the contrib directory. You may want to
look into that.
On Wednesday 08 March 2006 09:10, sunithab(at)travelpost(dot)com wrote:
> 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.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
--
UC
--
Open Source Solutions 4U, LLC 1618 Kelly St
Phone: +1 707 568 3056 Santa Rosa, CA 95401
Cell: +1 650 302 2405 United States
Fax: +1 707 568 6416
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2006-03-08 18:07:27 | Re: distance calculation usng lat and long in miles |
Previous Message | brew | 2006-03-08 17:33:47 | Re: distance calculation usng lat and long in miles |