Ticket #557 (closed defect: invalid)

Opened 4 years ago

Last modified 3 years ago

ST_Within fails at walls (upright polygons)

Reported by: weitzig Owned by: pramsey
Priority: medium Milestone: PostGIS 1.4.3
Component: postgis Version: 1.4.X
Keywords: Within, ST_Within, 3D Cc:

Description

ST_Within doesn't find upright polygons.

Prepare example:

CREATE table walltest();
SELECT AddGeometryColumn(walltest, feature, -1, 'GEOMETRY', 3 );
INSERT INTO walltest(feature) VALUES ('POLYGON((1 0 5,2 0 5,2 0 10,1 0 10,1 0 5))');

Execute Example:

SELECT feature FROM walltest WHERE ST_Within(feature,'POLYGON((-5.0 -5.0 0.0,5.0 -5.0 0.0,5.0 5.0 0.0,-5.1 5.0 0.0,-5.0 -5.0 0.0))')='T'

The query should find the polygon, but it doesn't.

Change History

Changed 3 years ago by weitzig

  • status changed from new to closed
  • resolution set to invalid

The behaviour is as defined by OGC. See  http://lin-ear-th-inking.blogspot.com/2007/06/subtleties-of-ogc-covers-spatial.html For a workaround, use a combination of 'ST_CoveredBy' and 'not touches'

Note: See TracTickets for help on using tickets.