MultiPolygon Functions
These functions return properties of MultiPolygon values.
Area(mpoly)Returns as a double-precision number the area of the
MultiPolygonvaluempoly, 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 MariaDB does not implement:
Centroid(mpoly)Returns the mathematical centroid for the
MultiPolygonvaluempolyas aPoint. The result is not guaranteed to be on theMultiPolygon.PointOnSurface(mpoly)Returns a
Pointvalue that is guaranteed to be on theMultiPolygonvaluempoly.