Search the MySQL manual:

11.4.5.3 Fetching Spatial Data in WKB Format

The AsBinary() function provides binary access to geometry values. It converts a geometry from internal format into a BLOB containing the WKB value.

SELECT AsBinary(g) FROM geom;

User Comments

Add your own comment.