[GIS] wkb/wkt according to OGC

pointrepresentationwell-known-binarywell-known-text

how can i store my coordinates in wkb.. i want to know its implementation of wkb and wkt in db .. any one can please guide me.

Best Answer

http://dev.mysql.com/doc/refman/5.0/en/gis-wkb-format.html

For example, a WKB value that corresponds to POINT(1 1) consists of this sequence of 21 bytes (each represented here by two hex digits):

0101000000000000000000F03F000000000000F03F

The sequence may be broken down into these components:

Byte order : 01
WKB type   : 01000000
X          : 000000000000F03F
Y          : 000000000000F03F