[PostGIS] #5672: Function ST_3DIntersects does not work for MULTILINESTRING and LINESTRING.

PostGIS trac at osgeo.org
Fri Mar 22 04:10:14 PDT 2024


#5672: Function ST_3DIntersects does not work for MULTILINESTRING and LINESTRING.
----------------------+---------------------
  Reporter:  Wenjing  |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  medium   |  Milestone:
 Component:  postgis  |    Version:  3.4.x
Resolution:           |   Keywords:
----------------------+---------------------
Comment (by Wenjing):

 Paul, did you have a chance to look at this one? It is very strange.
 @pramsey

 The test cases with two same lines only containing two points trigger this
 kind of issue.

 Replacing MULTILINESTRING with LINESTRING triggers it as well.

 {{{
 SELECT ST_3DIntersects(b1, b2)
     FROM ST_GeomFromText('LINESTRING Z (1 0 0, 0 0 0)')
     As b1,
     ST_GeomFromText('LINESTRING Z (1 0 0, 0 0 0)')
     As b2;
 -- actual{f}; expected{t}
 }}}

 However, reordering the points does not.

 {{{
 SELECT ST_3DIntersects(b1, b2)
     FROM ST_GeomFromText('LINESTRING Z (0 0 0,1 0 0)')
     As b1,
     ST_GeomFromText('LINESTRING Z (1 0 0,0 0 0)')
     As b2;
 -- result{t}
 }}}

 Meanwhile, adding a point avoids triggering it.

 {{{
 SELECT ST_3DIntersects(b1, b2)
     FROM ST_GeomFromText('MULTILINESTRING Z ((2 0 0,1 0 0,0 0 0))')
     As b1,
     ST_GeomFromText('LINESTRING Z (2 0 0,1 0 0,0 0 0)')
     As b2;
 -- result{t}
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5672#comment:1>
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