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) - 198.3Kb
Man Pages (Zip) - 302.2Kb
Info (Gzip) - 3.2Mb
Info (Zip) - 3.2Mb
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.7/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.