MySQL 5.1 リファレンスマニュアル :: 16 Spatial Extensions :: 16.5 Analyzing Spatial Information :: 16.5.2 Geometry Functions :: 16.5.2.6 MultiPolygon Functions
« 16.5.2.5 Polygon Functions

16.5.2.7 GeometryCollection 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.6. MultiPolygon Functions

  • Area(mpoly)

    Returns as a double-precision number the area of the MultiPolygon value mpoly, as measured in its spatial reference system.

    mysql> SET @mpoly =
        -> 'MultiPolygon(((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1)))';
    mysql> SELECT Area(GeomFromText(@mpoly));
    +----------------------------+
    | Area(GeomFromText(@mpoly)) |
    +----------------------------+
    |                          8 |
    +----------------------------+
    

The OpenGIS specification also defines the following functions, which MySQL does not implement:

  • Centroid(mpoly)

    Returns the mathematical centroid for the MultiPolygon value mpoly as a Point. The result is not guaranteed to be on the MultiPolygon.

  • PointOnSurface(mpoly)

    Returns a Point value that is guaranteed to be on the MultiPolygon value mpoly.

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