By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,693 Members | 1,972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,693 IT Pros & Developers. It's quick & easy.

earthdistance results seem to be wrong.

P: n/a
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.
Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.


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

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.