MySQL Reference Manual for version 4.0.18.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

17.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> SELECT Area(GeomFromText('MultiPolygon(((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1)))'));
+-----------------------------------------------------------------------------------+
| Area(GeomFromText('MultiPolygon(((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1)))')) |
+-----------------------------------------------------------------------------------+
|                                                                                 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.



This document was generated by rdg (Feb 25 2004) using texi2html