Bug #62532 Mistake with geometry functions Contains(), Within(), Crosses() and so on.
Submitted: 25 Sep 2011 6:15 Modified: 25 Sep 2011 13:10
Reporter: Vladimir Nasedkin Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: GIS Severity:S2 (Serious)
Version:5.5 OS:FreeBSD
Assigned to: CPU Architecture:Any

[25 Sep 2011 6:15] Vladimir Nasedkin
Description:
SELECT Contains(GeomFromText('Polygon((0 0,0 3,3 0,0 0))'),GeomFromText('Point(3 3)'))

Get: 1, but must be: 0.

Contains() works as well as MBRContains(). :-(

How to repeat:
SELECT Contains(GeomFromText('Polygon((0 0,0 3,3 0,0 0))'),GeomFromText('Point(3 3)'))
[25 Sep 2011 7:20] Valeriy Kravchuk
This is a documented limitation. Please, read http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geo...:

"Currently, MySQL does not implement these functions according to the specification. Those that are implemented return the same result as the corresponding MBR-based functions."
[25 Sep 2011 7:41] Vladimir Nasedkin
If it's no secret that when a decision is expected approximately this problem?
[25 Sep 2011 10:48] Valeriy Kravchuk
We have this Worklog, http://forge.mysql.com/worklog/task.php?id=2377, for all missing GIS features. I do not see Contains() etc mentioned there specifically, but it's work in progress anyway. 

I would NOT expect implementation in 5.6 for sure. Some later version, maybe.