Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 738 Bytes

25.md

File metadata and controls

17 lines (14 loc) · 738 Bytes

Consider the following statements:

SET @g1 = ST_GeomFromText('POLYGON((445 614,26 30,30 80,445 614))');
SET @g2 = ST_GeomFromText('MULTIPOLYGON(((445 614,26 30,30 80,445 614)),((1010 190,90 40,40 90,1010 190)))');

SELECT ST_Overlaps(@g2, @g1);
--expected{0}; actual{1}

According to the definition of ST_Overlaps:

Two geometries spatially overlap if they intersect and their intersection results in a geometry of the same dimension but not equal to either of the given geometries.

@g1 does not overlap @g2 because the intersection of @g1 and @g2 is equal to @g1which violates "neither one covers the other".

Version: 8.2.0 the latest version in Github: 87307d4ddd88405117e3f1e51323836d57ab1f57