Cariable @mp is assigned a Multipoint object with three points : GEOMFROMTEXT « Geometric « SQL / MySQL






Cariable @mp is assigned a Multipoint object with three points

    
mysql>
mysql>
mysql> SET @mp = GEOMFROMTEXT('MULTIPOINT(1 1, 10 99, 0 5)');
Query OK, 0 rows affected (0.00 sec)

mysql>
mysql> SELECT ASTEXT(ENVELOPE(@mp)), ASTEXT(ENVELOPE(@mp));
+------------------------------------+------------------------------------+
| ASTEXT(ENVELOPE(@mp))              | ASTEXT(ENVELOPE(@mp))              |
+------------------------------------+------------------------------------+
| POLYGON((0 1,10 1,10 99,0 99,0 1)) | POLYGON((0 1,10 1,10 99,0 99,0 1)) |
+------------------------------------+------------------------------------+
1 row in set (0.00 sec)

mysql>
mysql>

   
    
    
    
  








Related examples in the same category

1.Length of a LineString is sought
2.Using GEOMFROMTEXT function: Creates the internal MySQL GEOMETRY format from a WKT string.