Bug #61795 ERROR 1305 (42000): FUNCTION PointOnSurface does not exist
Submitted: 8 Jul 2011 2:09 Modified: 8 Jul 2011 3:38
Reporter: Madhura Jayaratne Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: GIS Severity:S3 (Non-critical)
Version:5.1.41-3 OS:Linux
Assigned to: CPU Architecture:Any
Tags: PointOnSurface

[8 Jul 2011 2:09] Madhura Jayaratne
Description:
Using PointOnSurface function on a multipolygon results in

ERROR 1305 (42000): FUNCTION PointOnSurface does not exist.

Further, I do not have spaces in between the function and the parenthesis. 

How to repeat:
Try,

mysql> select PointOnSurface(GeomFromText('MULTIPOLYGON(((136 40,147 83,162 75,136 40)),((105 0,56 200,78 93,105 0)))'));

This results in the above error.
[8 Jul 2011 3:16] MySQL Verification Team
Thank you for the bug report. Actually it's not implemented as documented:

http://dev.mysql.com/doc/refman/5.1/en/geometry-property-functions.html

"11.17.5.2.6. MultiPolygon Functions

<cut>

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

<cut>

PointOnSurface(mpoly)"
[8 Jul 2011 3:38] Madhura Jayaratne
Extremely sorry about my carelessness.

Out of curiosity, I wonder how the other function on multipolygon, function CENTROID(), which is also said to have not been implemented gives me results.

mysql> select AsText(Centroid(GeomFromText('MULTIPOLYGON(((136 40,147
83,162 75,136 40)),((105 0,56 200,78 93,105 0)))'))) as `Centroid`;
+------------------------------------------+
| Centroid                                 |
+------------------------------------------+
| POINT(111.603637901861 82.9384517766497) |
+------------------------------------------+
1 row in set (0.00 sec)
[9 Jul 2011 5:52] MySQL Verification Team
Thanks, that's a docs typo. I'll write to docs and inform them about Centroid