content_image/724913.jpg content_image/724914.jpg content_image/724915.jpg content_image/724916.jpg content_image/724917.jpg content_image/724918.jpg content_image/724921.jpg
mysql> SET @ls = ST_GeomFromText(’LineString(1 1,2 2,3 3)’); mysql> SELECT ST_Length(@ls); 

<img src='content_image/724913.jpg'>

mysql> SET @mls = ST_GeomFromText(’MultiLineString((1 1,2 2,3 3),(4 4,5 5))’); mysql> SELECT ST_Length(@mls); 

<img src='content_image/724914.jpg'>

mysql> SET @ls = ST_GeomFromText(’LineString(1 1,2 2,3 3)’, 4326); mysql> SELECT ST_Length(@ls); 

<img src='content_image/724915.jpg'>

mysql> SELECT ST_Length(@ls, ’metre’); 

<img src='content_image/724916.jpg'>

mysql> SELECT ST_Length(@ls, ’foot’); 

<img src='content_image/724917.jpg'>

• ST_NumPoints( ls ) 

Returns the number of Point  objects in the LineString  value ls . 

ST_NumPoints()  handles its arguments as described in the introduction to this section. 

mysql> SET @ls = ’LineString(1 1,2 2,3 3)’; mysql> SELECT ST_NumPoints(ST_GeomFromText(@ls)); 

<img src='content_image/724918.jpg'>

• ST_PointN( ls , N ) 

Returns the N -th Point  in the Linestring  value ls . Points are numbered beginning with 1. 

ST_PointN()  handles its arguments as described in the introduction to this section. 

mysql> SET @ls = ’LineString(1 1,2 2,3 3)’; mysql> SELECT ST_AsText(ST_PointN(ST_GeomFromText(@ls),2)); 

<img src='content_image/724921.jpg'>

