Using GEOMFROMTEXT function: Creates the internal MySQL GEOMETRY format from a WKT string. : GEOMFROMTEXT « Geometric « SQL / MySQL






Using GEOMFROMTEXT function: Creates the internal MySQL GEOMETRY format from a WKT string.

    
mysql>
mysql> CREATE TABLE mytable (
    ->     id INT NOT NULL PRIMARY KEY,
    ->     border POLYGON NOT NULL,
    ->     ela LINESTRING,
    ->     ref POINT
    -> );
Query OK, 0 rows affected (0.00 sec)

mysql>
mysql>
mysql> INSERT INTO mytable(ref) VALUES(GEOMFROMTEXT('POINT(681547 5237595)'));
Query OK, 1 row affected, 2 warnings (0.00 sec)

mysql>
mysql> drop table mytable;
Query OK, 0 rows affected (0.00 sec)

mysql>

   
    
    
    
  








Related examples in the same category

1.Length of a LineString is sought
2.Cariable @mp is assigned a Multipoint object with three points