[PostGIS] #5711: Failed adding single touches interior of edge 128 LOCATION: pg_error, lwgeom_pg.c:361

PostGIS trac at osgeo.org
Mon Apr 15 08:44:42 PDT 2024


#5711: Failed adding single  touches interior of edge 128 LOCATION:  pg_error,
lwgeom_pg.c:361
--------------------------------+---------------------------
  Reporter:  Lars Aksel Opsahl  |      Owner:  strk
      Type:  defect             |     Status:  new
  Priority:  medium             |  Milestone:  PostGIS 3.4.3
 Component:  topology           |    Version:  3.4.x
Resolution:                     |   Keywords:
--------------------------------+---------------------------
Comment (by strk):

 This case is very similar to the one reported in #5699, that is: the
 second edge's first segment is almost coincident with one portion of the
 first edge, and then turns away from it. The turning vertex is very very
 close to the first edge but did not snap to it as we only snap to
 vertices, not segments, and because we try not to snap existing vertices.

 When the third line is loaded, GEOS is not capable of representing a
 segment from the first edge to the central vertex of the second edge, but
 reports a single shared node between all edges. Then PostGIS Topology
 enters this intersection point to the Topology and only snaps the closest
 edge, happening to be the turning one (second edge). When the line is
 added it's found to cross the first edge.

 The code in https://git.osgeo.org/gitea/postgis/postgis/pulls/196 seems to
 resolve the problem by also snapping and splitting the first edge,
 effectively merging the portions of those two first edges into one.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5711#comment:3>
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