Related Documentation Download this Manual
PDF (US Ltr) - 30.6Mb
PDF (A4) - 30.8Mb
PDF (RPM) - 30.1Mb
EPUB - 7.7Mb
HTML Download (TGZ) - 7.5Mb
HTML Download (Zip) - 7.5Mb
HTML Download (RPM) - 6.4Mb
Eclipse Doc Plugin (TGZ) - 8.2Mb
Eclipse Doc Plugin (Zip) - 10.1Mb
Man Pages (TGZ) - 200.3Kb
Man Pages (Zip) - 311.6Kb
Info (Gzip) - 2.9Mb
Info (Zip) - 2.9Mb
Excerpts from this Manual

functions-that-create-new-geometries-from-existing-ones

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

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

Please update any bookmarks that point to the old page.


User Comments
  Posted by ALEXANDER SKAKUNOV on July 2, 2012
We work a lot with LineString columns in our project (http://www.sunnyrentals.com).

To make it easier to get Nth line from the LineString, we use this function (similar to PointN):

DELIMITER //
DROP FUNCTION IF EXISTS LineN; //
CREATE FUNCTION LineN(ls LINESTRING, n INT) RETURNS LINESTRING NO SQL DETERMINISTIC
BEGIN
IF n >= numPoints(ls) THEN
RETURN NULL;
END IF;
RETURN LineString(PointN(ls, n), PointN(ls, n+1));
END; //

Sign Up Login You must be logged in to post a comment.