Search the MySQL manual:

11.5.2.6 MultiPolygon Property Analysis 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 yet 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.

User Comments

Add your own comment.