MySQL Forums
Forum List  »  GIS

How long is a piece of string?
Posted by: Andrew Dodson
Date: August 18, 2009 10:51AM

I've read alot of the documentation on mysql site which fail to mention the unit of measurement returned.

KM, Miles, Acres, Hops, Skips or as big as your back garden?

In particular i'm trying to recreate one such offender the "Distance() function" from what i believe to be commonly recreated like so

------------
SELECT GLength(LineStringFromWKB(LineString(AsBinary(GeomFromText('POINT(40.756054 -73.986951)')),
AsBinary(GeomFromText('POINT(51.5001524 -0.1262362)'))))) AS distance
------------
OUTPUT:
74.6

In this example i'm trying to find the distance between New York and London, which is about 3,500miles or 5600KM.

WTF is 74.6?

Options: ReplyQuote


Subject
Views
Written By
Posted
How long is a piece of string?
4229
August 18, 2009 10:51AM
2777
August 18, 2009 12:37PM
3211
August 18, 2009 01:48PM
5184
August 19, 2009 05:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.