Calculation of the length of a route.
mysql>
mysql>
mysql> SET @ls = GEOMFROMTEXT('LINESTRING(2 2, 9 0, 9 9)');
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> SELECT GLENGTH(@ls);
+------------------+
| GLENGTH(@ls) |
+------------------+
| 16.2801098892805 |
+------------------+
1 row in set (0.00 sec)
mysql>
Related examples in the same category