[PostGIS] #6120: XX000: SQL/MM Spatial exception - curve not simple

PostGIS trac at osgeo.org
Wed Sep 2 01:55:52 PDT 2026


#6120: XX000: SQL/MM Spatial exception - curve not simple
--------------------------------+---------------------------
  Reporter:  Lars Aksel Opsahl  |      Owner:  strk
      Type:  defect             |     Status:  new
  Priority:  medium             |  Milestone:  PostGIS 3.6.5
 Component:  topology           |    Version:  3.6.x
Resolution:                     |   Keywords:
--------------------------------+---------------------------
Comment (by strk):

 The case at hand sees a closed line defined by 6 vertices forming a very
 tiny area (`ST_Area` reports `4.444311098450691e-18` units) as the
 starting condition.

 With this starting condition a line defined by 5 vertices but covering
 *about* the same area is passed to `TopoGeo_addLineString` and that
 triggers the error.


 All 5 vertices of the incoming line fall exactly on a vertex of the
 existing line, but the existing line has 1 additional vertex which is at
 `5.038095382105394e-15` distance from the incoming line (closes point is
 internal to an incoming segment).

 {{{
 strk=# with dists as ( select d.path[1] v1i, st_distance(d.geom, g2) dist,
 min(st_distance(d.geom, g2)) over (partition by d.path[1]) FROM
 t6020_inputs, LATERAL st_dumppoints(g1) d ) select v1i, dist from dists
 where dist = min;
  v1i |         dist
 -----+-----------------------
    1 |                     0
    2 |                     0
    3 |                     0
    4 | 5.038095382105394e-15
    5 |                     0
    6 |                     0
 (6 rows)
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/6120#comment:2>
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