(mysql.info) fetching-spatial-data
Info Catalog
(mysql.info) populating-spatial-columns
(mysql.info) creating-a-spatially-enabled-mysql-database
16.4.5 Fetching Spatial Data
----------------------------
Geometry values stored in a table can be fetched in internal format.
You can also convert them into WKT or WKB format.
* Fetching spatial data in internal format:
Fetching geometry values using internal format can be useful in
table-to-table transfers:
CREATE TABLE geom2 (g GEOMETRY) SELECT g FROM geom;
* Fetching spatial data in WKT format:
The `AsText()' function converts a geometry from internal format
into a WKT string.
SELECT AsText(g) FROM geom;
* Fetching spatial data in WKB format:
The `AsBinary()' function converts a geometry from internal format
into a `BLOB' containing the WKB value.
SELECT AsBinary(g) FROM geom;
Info Catalog
(mysql.info) populating-spatial-columns
(mysql.info) creating-a-spatially-enabled-mysql-database
automatically generated byinfo2html