You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DROPTABLE IF EXISTS t0;
CREATETABLEt0 (id int, geom geometry, valid boolean);
INSERT INTO t0 (id, geom) VALUES (1,ST_GeomFromText('LINESTRING(1 2,1 1)',0));
INSERT INTO t0 (id, geom) VALUES (2,ST_GeomFromText('GEOMETRYCOLLECTION(POINT(2 2),POINT(1 0),LINESTRING(1 2,1 1))',0));
INSERT INTO t0 (id, geom) VALUES (3,ST_GeomFromText('POLYGON((1 0,0 4,2 2,1 0))',0));
SELECTa1.id, a2.idFROM t0 As a1 JOIN t0 As a2 ON ST_Contains(a1.geom, a2.geom);
-- result: {1,1; 2,1; 2,2; 3,1; 3,2; 3, 3} SELECT ST_Contains(a1.geom, a2.geom) FROM t0 as a1, t0 as a2 WHEREa1.id=3anda2.id=2;
-- expected: true; actual: false
g3 contains g2 because POINTs of g2 lie in the boundary of g3 and LINESTRING of g2 lies in the interior of g3, which satisfied the sematics of contains:
ST_Contains(A, B) ⇔ (A ⋂ B = B) ∧ (Int(A) ⋂ Int(B) ≠ ∅)
I consider the issue different from #982 because the boundary of g3 is not ambiguous.
The predicate of ContainsPrep gives the correct answer. A simple statement reproduced in Geos:
This is a problem relatively deep in the IM calculation, so we are going to instead focus on the RelateNG work, which hopefully removes this inconsistency in future releases (and is faster).
Consider the statement:
g3 contains g2 because POINTs of g2 lie in the boundary of g3 and LINESTRING of g2 lies in the interior of g3, which satisfied the sematics of contains:
I consider the issue different from #982 because the boundary of g3 is not ambiguous.
The predicate of ContainsPrep gives the correct answer. A simple statement reproduced in Geos:
The version of Geos is the latest one:
6f70b63
The text was updated successfully, but these errors were encountered: