473,799 Members | 2,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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('12 2.55688','45.51 3746'),ll_to_ea rth('122.396357 ','47.648845')) ;

The result I get is this:

128862.56322750 6

The distance from Portland to Seattle is not 128862
miles.
Nov 23 '05 #1
1 1174
select
earth_distance( ll_to_earth('12 2.55688','45.51 3746'),ll_to_ea rth('122.396357 ','47.648845')) ;

The result I get is this:

128862.56322750 6

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4107
by: bill | last post by:
Hi, This looks like a simple problem, but I just can't seem to wrap my head around it. I'm trying to build a table dynamically, based on a result set from mysql. There will be 9 results for a full page, with 3 table rows of 3 table cells. One result per cell. But all of the pages won't be full. Here's one of many ways I've tried to do it:
13
2544
by: NM | last post by:
Sometimes ago I was having a problem in linking between C++ and Fortran program. That was solved (using input from this newsgroup) using the Fortran keyword "sequence" with the derived types (to assume contiguous space). Now I am having problem again. In order to show the problem I have created small program and this time there is no data straucture being passed between C++ and Fortran. Here is how the program looks like
1
5599
by: JM | last post by:
Hello, A very simple select query (no joins) to a linked ODBC SQL Server 2000 table produces incorrect results. The right number of rows seem to be returned, but some of the columns have incorrect values. I converted the query to a pass-through, and it worked as expected. Does anybody have an idea as to why this might happen? I'd rather leave the query as Jet, because it's supposed to be updateable. I'm converting an Access 2000...
6
11850
by: lakshmi | last post by:
Hi all I'm trying to traverse through the results from a query that returns more than 1 row. The data reader reads only the first row. The following code doesn't work. Let me know what's wrong. do { while(reader.read) { x += y;
2
1137
by: Matt Michael | last post by:
I'm using ADO .NET to connect to a Microsoft Access database, and everything so far has been working in my program except one small problem. I am constructing a query string to search for certain results from a table, and it does not seem to return the correct results. Dim dtResults As New DataTable("SearchResults") Dim cmdSearchResults As New OleDb.OleDbCommand(queryString, appointments.myConnection)
12
4320
by: mike cox | last post by:
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:
11
2081
by: frankie_85 | last post by:
Hi everyone, I just made a simple code which is part of my assignment but I can't figure it out what's wrong with it. (always give me error messages) What the code basically does is: a function that takes one floating point number x as its argument and returns (the square root of the absolute value of x) plus (5 times x cubed).
318
13084
by: jacob navia | last post by:
Rcently I posted code in this group, to help a user that asked to know how he could find out the size of a block allocated with malloc. As always when I post something, the same group of people started to try to find possible errors, a harmless passtime they seem to enjoy. One of their remarks was that I used "int" instead of "size_t" for the input of my allocator function.
5
3458
by: ukfusion | last post by:
I have an sql query which has several fields and no matter how hard i try i cant get the less than statement to work....i originally tried between but that wouldnt work either. $yourpricesearch is the name of the drop box with in the search form with the price values of 5.00, 10.00, 15.00 etc...i did it this way as i wasn't sure if when i put the AND in when the value of $yourpricesearch was empty would cause problems so im only putting the...
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10495
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10269
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10248
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7573
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4148
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.