A Point consists of X and Y coordinates,
which may be obtained using the following functions:
Returns the X-coordinate value for the point
p as a double-precision number.
mysql>SET @pt = 'Point(56.7 53.34)';mysql>SELECT X(GeomFromText(@pt));+----------------------+ | X(GeomFromText(@pt)) | +----------------------+ | 56.7 | +----------------------+
Returns the Y-coordinate value for the point
p as a double-precision number.
mysql>SET @pt = 'Point(56.7 53.34)';mysql>SELECT Y(GeomFromText(@pt));+----------------------+ | Y(GeomFromText(@pt)) | +----------------------+ | 53.34 | +----------------------+

User Comments
Add your own comment.