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
SELECT ST_ContainsProperly(a1, a2)
FROM ST_GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 1, 0 0),POINT(0 0))') As a1
,ST_GeomFromText('POINT(0 0)') As a2;
--expected{f}, actual{t}
ST_ContainsProperly(a1, a2) returned true, which is not expected.
According to the definition, ContainsProperly returns false when the point of a1 is on the boundary of a2.
Returns true if every point of B lies in the interior of A (or equivalently, no point of B lies in the boundary or exterior of A).
In mathematical terms: ST_ContainsProperly(A, B) ⇔ Int(A) ⋂ B = B
The boundary of a1 (MULTIPOINT((0 1),(0 0), EMPTY)) contains a2, thus, We expect that ContainsProperly returns false.
SELECT ST_AsText(ST_Boundary(a1)), ST_Contains(ST_Boundary(a1), a2)
FROM ST_GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 1, 0 0),POINT(0 0))') As a1
, ST_GeomFromText('POINT(0 0)') As a2;
-- st_astext | st_contains -- -------------------------------+--------------- MULTIPOINT((0 1),(0 0),EMPTY) | t-- (1 row)
The version is the lastest:
POSTGIS="3.5.0dev 3.4.0rc1-705-g5c3ec8392" [EXTENSION] PGSQL="170" GEOS="3.13.0dev-CAPI-1.18.0" PROJ="8.2.1 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org/ USER_WRITABLE_DIRECTORY=/tmp/proj DATABASE_PATH=/usr/share/proj/proj.db" LIBXML="2.9.13"
The text was updated successfully, but these errors were encountered:
Consider the following statement:
ST_ContainsProperly(a1, a2)
returned true, which is not expected.According to the definition, ContainsProperly returns false when the point of a1 is on the boundary of a2.
The boundary of a1 (
MULTIPOINT((0 1),(0 0), EMPTY)
) contains a2, thus, We expect that ContainsProperly returns false.The version is the lastest:
POSTGIS="3.5.0dev 3.4.0rc1-705-g5c3ec8392" [EXTENSION] PGSQL="170" GEOS="3.13.0dev-CAPI-1.18.0" PROJ="8.2.1 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org/ USER_WRITABLE_DIRECTORY=/tmp/proj DATABASE_PATH=/usr/share/proj/proj.db" LIBXML="2.9.13"
The text was updated successfully, but these errors were encountered: