How to calculate a distance between point a to b by using Longitude and Latitude
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


How to calculate a distance between point a... Expand / Collapse
Author
Message
Posted 5/29/2008 5:42:13 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/14/2009 5:16:08 PM
Posts: 8, Visits: 15
Hi, i need help to use Teradata SQL function to calcuation a distance from point a to point b which are using Longitude and latitude.

Please helps...

thanks,


T-Nguyen
Post #11665
Posted 5/29/2008 10:40:09 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 9/19/2009 4:48:19 PM
Posts: 105, Visits: 146
I’m not sure whether you are asking for the formulas or just how to do it in SQL. Maybe you can provide the formula and how the data is represented and then someone could suggest a method.

My suggestion would be to write a UDF or create a UDT (User Defiend Type) that contains the earth coordinates. Then you can define the user defined methods (UDMs) that operate on that data type.

If you are just looking for the formulas you can google that and get all sorts of hits that might be useful to you.
Post #11668
Posted 2/11/2009 7:26:20 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/14/2009 5:16:08 PM
Posts: 8, Visits: 15
Hi Supprem being,

i need both formular and replicate that into SQL. if you have some source of example, i able to clone that.
thanks,


T-Nguyen
Post #14425
Posted 2/12/2009 4:12:06 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 11/5/2009 4:40:02 PM
Posts: 717, Visits: 466
First you have to define "distance", because there are several ways to calculate this :-)

For the "great circle distance" (http://en.wikipedia.org/wiki/Great_circle) there's already a UDF at
http://www.teradata.com/DownloadCenter/Topic9248-144-1.aspx

Dieter
Post #14433
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 1:42am

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.031. 9 queries. Compression Disabled.