views:

105

answers:

1

I want to get the length in meters between 2 points in the surface of the Earth. But the GLength method returns an unexpected value

http://dev.mysql.com/doc/refman/5.0/en/geometry-property-functions.html#function_glength

SELECT GLength(GeomFromText(
   'LINESTRING(-67.8246 -10.0073,-67.8236 -10.0082)', 4326))

actual result

0.00134536240471071

expected value in meters:

147
A: 

I haven't found a source, but I was playing with this method and I concluded that the result is given in the same unit used in the WKT.

And the distance is calculated in planar coordinates. The SRID is not taken into account.

Jader Dias