[PostGIS] #5782: TopoGeo_addLinestring corrups topology: adjacent edges 33 and -32 bind different face (1 and 0)

PostGIS trac at osgeo.org
Tue Sep 24 03:27:57 PDT 2024


#5782: TopoGeo_addLinestring corrups topology: adjacent edges 33 and -32 bind
different face (1 and 0)
--------------------------------+---------------------------
  Reporter:  Lars Aksel Opsahl  |      Owner:  strk
      Type:  defect             |     Status:  new
  Priority:  high               |  Milestone:  PostGIS 3.5.0
 Component:  topology           |    Version:
Resolution:                     |   Keywords:
--------------------------------+---------------------------
Comment (by strk):

 Of course the same problem occurs with GetFaceContainingPoint:
 {{{
 =# select GetFaceContainingPoint('t5782', 'POINT(18.006691126034692
 69.04048768506776)');
  getfacecontainingpoint
 ------------------------
                       1
 (1 row)
 }}}

 Both edges are found to have no interior intersection with the shortest
 line between the query point and edge 3:
 {{{
 =# with candidate as ( select ST_ShortestLine('POINT(18.006691126034692
 69.04048768506776)', geom) sl from t5782.edge where edge_id = 3) select
 edge_id, ST_Relate(geom, sl) from t5782.edge, candidate where
 ST_Intersects(geom, sl)
 ;
  edge_id | st_relate
 ---------+-----------
        4 | F01FF0102
        3 | F01FF0102
 (2 rows)
 }}}

 And both edges are found to have an interior intersection with the
 shortest line between query point and edge 4:
 {{{
 =# with candidate as ( select ST_ShortestLine('POINT(18.006691126034692
 69.04048768506776)', geom) sl from t5782.edge where edge_id = 4) select
 edge_id, ST_Relate(geom, sl) from t5782.edge, candidate where
 ST_Intersects(geom, sl)
 ;
  edge_id | st_relate
 ---------+-----------
        4 | 0F1FF0102
        3 | 0F1FF0102
 (2 rows)
 }}}

 I don't feel I can trust any of the above

 Here's a picture of the shortest line between query point and any of the
 two edges:

 [[Image(shortestLine.png)]]
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5782#comment:13>
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