[PostGIS] #5786: Side-location conflict: new edge starts in face 42 and ends in face 10

PostGIS trac at osgeo.org
Thu Oct 3 02:56:03 PDT 2024


#5786: Side-location conflict: new edge starts in face 42 and ends in face 10
--------------------------------+---------------------------
  Reporter:  Lars Aksel Opsahl  |      Owner:  strk
      Type:  defect             |     Status:  new
  Priority:  medium             |  Milestone:  PostGIS 3.5.1
 Component:  topology           |    Version:  master
Resolution:                     |   Keywords:  robustness
--------------------------------+---------------------------
Comment (by strk):

 The problem seems to be in the experimental edge merging code. The code
 correctly finds that splitting the lower edge (edge 1) on the same new
 node as the upper edge (edge 2) ends up collapsing to the newly created
 edge 3 on the last part of original edge 2, but fails to set the side
 face:
 {{{
 =# select edge_id, left_face, right_face from t5786.edge;
  edge_id | left_face | right_face
 ---------+-----------+------------
        2 |         0 |          1
        3 |         1 |          1
        1 |         0 |          1
 }}}

 The correct labeling for edge_id=3 would be that both left and right face
 are 0.

 These are the debug log of the wrong operation:
 {{{
 [.././../liblwgeom/topo/lwgeom_topo.c:_lwt_SnapEdgeToExistingNode:5411]
 Existing edge 3 (post-modEdgeSplit) next_right:-2, next_left:1,
 face_right:1, face_left:0
 [.././../liblwgeom/topo/lwgeom_topo.c:_lwt_SnapEdgeToExistingNode:5446]
 Setting nextEdge/sideFace of CCW edge -2 to 1/0
 [.././../liblwgeom/topo/lwgeom_topo.c:_lwt_SnapEdgeToExistingNode:5472]
 Will update next_left/face_left of incoming CCW edge 2 to 1/0
 [.././../liblwgeom/topo/lwgeom_topo.c:_lwt_SnapEdgeToExistingNode:5505]
 Setting sideFace of CW edge 3 to 1
 }}}

 Inn particular, the last line shows the wrong operation
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5786#comment:14>
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