DIMENSION()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Enterprise Server
Topics on this page:
Overview
See ST_
EXAMPLES
SELECT DIMENSION(ST_GeomFromText('LineString(1 2,2 3,3 4,4 5)'));
+-----------------------------------------------------------+
| DIMENSION(ST_GeomFromText('LineString(1 2,2 3,3 4,4 5)')) |
+-----------------------------------------------------------+
| 1 |
+-----------------------------------------------------------+
SET @poly = 'POLYGON((0 0,5 0,5 5,0 5,0 0),(1 1,2 1,2 2,1 2,1 1))';
SELECT DIMENSION(ST_GeomFromText(@poly));
+-----------------------------------+
| DIMENSION(ST_GeomFromText(@poly)) |
+-----------------------------------+
| 2 |
+-----------------------------------+
SELECT DIMENSION(ST_GeomFromText('POINT(1 2)'));
+------------------------------------------+
| DIMENSION(ST_GeomFromText('POINT(1 2)')) |
+------------------------------------------+
| 0 |
+------------------------------------------+