Related Documentation Download this Manual
PDF (US Ltr) - 35.3Mb
PDF (A4) - 35.5Mb
PDF (RPM) - 33.8Mb
EPUB - 8.6Mb
HTML Download (TGZ) - 8.4Mb
HTML Download (Zip) - 8.5Mb
HTML Download (RPM) - 7.3Mb
Eclipse Doc Plugin (TGZ) - 9.3Mb
Eclipse Doc Plugin (Zip) - 11.3Mb
Man Pages (TGZ) - 197.9Kb
Man Pages (Zip) - 301.8Kb
Info (Gzip) - 3.2Mb
Info (Zip) - 3.2Mb
Excerpts from this Manual

multilinestring-property-functions

This page has moved or been replaced. The new page is located here:

http://dev.mysql.com/doc/refman/5.7/en/gis-property-functions.html

Please update any bookmarks that point to the old page.


User Comments
  Posted by Mircea LUTIC on May 25, 2005
The result of GLength() depends on the type of Spatial Reference (SRID).

The value above is based on euclidian geometry.
The length of a line (and hence of a LineString and MultiLineString) is given by
SQRT ( (x2-x1)^2 + (y2-y1)^2 )
only in planar (euclidian) geometry.

If x & y are spherical lattitude and longitude then the distance between 2 points of coordinates (lng1,lat1) and (lng2,lat2) is given by
distInRadians = acos ( sin(lat1)*sin(lat2) +cos(lat1)*cos(lat2)*cos(lng2-lng1) )
distInMeters = distInRadians * RadiusOfSphere

See also My comment on 19.5.2.6 MultiPolygon Functions
Sign Up Login You must be logged in to post a comment.