Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 02:22 AM
Mike Cox
Guest
 
Posts: n/a
Default earthdistance results seem to be wrong.

I'm running PostgreSQL 8.0 beta 1. I'm using the
earthdistance to find the distance between two
different latitude and logitude locations.
Unfortunately, the result seems to be wrong.

Here is what I'm doing:
select
earth_distance(ll_to_earth('122.55688','45.513746' ),ll_to_earth('122.396357','47.648845'));

The result I get is this:

128862.563227506

The distance from Portland to Seattle is not 128862
miles.
  #2  
Old November 23rd, 2005, 02:23 AM
Chris Mair
Guest
 
Posts: n/a
Default Re: earthdistance results seem to be wrong.

[color=blue]
> select
> earth_distance(ll_to_earth('122.55688','45.513746' ),ll_to_earth('122.396357','47.648845'));
>
> The result I get is this:
>
> 128862.563227506
>
> The distance from Portland to Seattle is not 128862
> miles.[/color]

It is 128000m = 128km.

Welcome to the metric system :)

Bye, Chris.



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles