[PostGIS] #5699: ERROR: XX000: SQL/MM Spatial exception - geometry crosses an edge

PostGIS trac at osgeo.org
Mon Mar 25 04:03:19 PDT 2024


#5699: ERROR:  XX000: SQL/MM Spatial exception - geometry crosses an edge
--------------------------------+---------------------------
  Reporter:  Lars Aksel Opsahl  |      Owner:  strk
      Type:  defect             |     Status:  assigned
  Priority:  medium             |  Milestone:  PostGIS 3.4.3
 Component:  topology           |    Version:  3.4.x
Resolution:                     |   Keywords:  robustness
--------------------------------+---------------------------
Comment (by strk):

 The initial state of the topology has only 2 edges being almost coincident
 in the segment incident to a shared node. Note how there is no node in the
 point in which they get far apart:

 [[Image(startTopo.png)]]

 The incoming line has an endpoint near the spot in which we're missing a
 node

 [[Image(incomingLine.png)]]

 According to `ST_Relate` the incoming line has the same relation to both
 edges:
 {{{
 =# select ST_Relate(i.g,e.geom), ST_Crosses(i.g, e.geom), ST_Touches(i.g,
 e.geom), e.edge_id from t5699_offending_input i, topo_t5699.edge e;
  st_relate | st_crosses | st_touches | edge_id
 -----------+------------+------------+---------
  FF10F0102 | f          | t          |       2
  FF10F0102 | f          | t          |       1
 (2 rows)
 }}}

 The matrix is:
 {{{
     i b e
     - - -
 i | F F 1
 b | 0 F 0
 e | 1 0 2
 }}}

 What the matrix tells us is that the incoming line's endpoint intersects
 with the interiors of both edges, but if it is true that those two edges
 only intersect at their boundary how can their interior intersect both
 with the same point ? It sounds like a possible bug in GEOS to me.

 `ST_Relate` finds one endpoint of the incoming segment being completely
 disjoint, as expected, and the other intersecting edge 2 but being
 disjoint from edge 1.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5699#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