Bug #86558 MBROverlaps(ls, ls) incorrect for perpendicular lines
Submitted: 2 Jun 2017 11:34 Modified: 11 Oct 2017 17:38
Reporter: Norvald Ryeng Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: GIS Severity:S3 (Non-critical)
Version:8.0.1 OS:Any
Assigned to: CPU Architecture:Any

[2 Jun 2017 11:34] Norvald Ryeng
Description:
MBROverlaps returns false when it should return true for perpendicular lines.

ST_Overlaps returns false since the overlapping part is 0-dimensional. It has to be 1-dimensional (i.e., a line) for ST_Overlaps to return true.

However, MBROverlaps is meant to work on the MBR of a line, which should be interpreted as a box, even if it is infinitely thin. ST_Overlaps(2d geometry, 2d geometry) does not have a dimensionality requirement on the overlapping region. Hence, MBROverlaps should return true for this case.

How to repeat:
SELECT MBROverlaps(
  ST_GeomFromText('LINESTRING(0 0, 0 2)'),
  ST_GeomFromText('LINESTRING(-1 1, 1 1)')
) AS should_be_true;
[11 Oct 2017 17:38] Paul DuBois
Posted by developer:
 
Fixed in 8.0.4, 9.0.0.

MBROverlaps() incorrectly returned false for two crossing
perpendicular lines.