MySQL 5.1 リファレンスマニュアル :: 16 Spatial Extensions :: 16.5 Analyzing Spatial Information :: 16.5.2 Geometry Functions :: 16.5.2.2 Point Functions
« 16.5.2.1 General Geometry Functions

16.5.2.3 LineString Functions »
Section Navigation      [Toggle]
  • 16.5.2 Geometry Functions
  • 16.5.2.1 General Geometry Functions
  • 16.5.2.2 Point Functions
  • 16.5.2.3 LineString Functions
  • 16.5.2.4 MultiLineString Functions
  • 16.5.2.5 Polygon Functions
  • 16.5.2.6 MultiPolygon Functions
  • 16.5.2.7 GeometryCollection Functions

16.5.2.2. Point Functions

A Point consists of X and Y coordinates, which may be obtained using the following functions:

  • X(p)

    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 |
    +----------------------+
    
  • Y(p)

    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 |
    +----------------------+
    
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices
Top / Previous / Next / Up / Table of Contents
© 2010, Oracle Corporation and/or its affiliates