[postgis-tickets] [PostGIS] #5025: Inconsistent behavior with ST_Within across versions

PostGIS trac at osgeo.org
Tue Jul 26 10:46:42 PDT 2022


#5025: Inconsistent behavior with ST_Within across versions
----------------------+---------------------------
  Reporter:  byrman   |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  medium   |  Milestone:  PostGIS 3.0.7
 Component:  postgis  |    Version:  3.1.x
Resolution:           |   Keywords:
----------------------+---------------------------
Comment (by pramsey):

 The operator and functions clearly disagree.
 {{{
 WITH g AS (
     SELECT
         'POLYGON Z ((-1 -1 0,-1 1 0,1 1 0,1 -1 0,-1 -1 0))'::geometry AS
 ply0,
         'POINT Z (0 0 1)'::geometry AS pt1,
         'POINT Z (0 0 0)'::geometry AS pt0
     )
 SELECT
     ST_Contains(ply0, pt0) AS contains_00,
     ST_Within(pt0, ply0)  AS within_00,
     ST_Contains(ply0, pt1) AS contains_01,
     ST_Within(pt1, ply0)  AS within_10,
     pt0 @@ ply0 AS op_within_00,
     pt1 @@ ply0 AS op_within_10,
     ply0 @@ pt1 AS op_within_01
 FROM g;
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5025#comment:7>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list