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

PostGIS trac at osgeo.org
Thu Sep 26 03:05:50 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.4.4
 Component:  topology           |    Version:
Resolution:                     |   Keywords:
--------------------------------+---------------------------
Comment (by strk):

 Replying to [comment:20 mdavis]:
 > It seems problematic to rely on distance calculation to determine
 topology, since it's inherently less precise than the actual geometric
 situation.

 The computation that goes wrong is finding which face contains a point.
 This used to be implemented by constructing the geometry of each face
 whose MBR covered the point and then computing PIP, but was later
 converted to finding the closest edge and finding out on which side of the
 edge the point was. I'm not sure which method would be more robust.

 > Perhaps the fundamental problem is treating nearly-identical linestrings
 as distinct edges.  Would it be possible to specify a distance tolerance,
 and raise an error if lines contain distinct sections which are closer
 than the tolerance?

 Tolerance can be already specified, and when it's not specified it is
 computed based on the extent of the input geometry.

 We currently only use the tolerance to snap, which doesn't help in this
 case (it helps if you swap the first to insertions).

 Distinct sections closer than tolerance would include incident edge ends
 which will always be problematic if the angle between them is too tiny.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5782#comment:23>
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