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}
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, ContainsProperly returns false that is expected.
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:
dr-jts
changed the title
ContainsProperly returns true when POINT A is on the boundary of Geometry B
ContainsProperly returns true when POINT B is on the boundary of GeometryCollection A
Nov 4, 2023
Consider the following statement:
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, ContainsProperly returns false that is expected.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: