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

PostGIS trac at osgeo.org
Thu Oct 3 07:13:13 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):

 It looks like the code having robustness issues is the one determining
 order of edges around the new node:

 > Component 1 of split edge 1 next CW is 3, next CCW is -2

 Truth is next CW should be -2 and next CCW should be 3
 The code in charge of telling is _lwt_FindAdjacentEdges
 We have the subject edge found to have an azimuth of
 4.68811780780983, edge 3 found to have azimuth of 1.54652515429415 and
 edge 2 found to have azimuth of
 4.68811780778147

 This means edge 2 is found to be BELOW the subject edge.

 This should never happen when no edge crossing is detected, and that check
 is performed successfully:

 > [.././../liblwgeom/topo/lwgeom_topo.c:lwt_ChangeEdgeGeom:3384]
 lwt_ChangeEdgeGeom: edge crossing check passed

 I should note that raising by 1e-14 the Y value of the middle point of
 edge 2 fixes the issue, confirming this is definitely a problem of
 numerical robustness
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5786#comment:15>
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