[PostGIS] #5792: TopoGeo_addPoint silently corrupts topology

PostGIS trac at osgeo.org
Wed Oct 9 03:47:29 PDT 2024


#5792: TopoGeo_addPoint silently corrupts topology
-----------------------+---------------------------
  Reporter:  strk      |      Owner:  strk
      Type:  defect    |     Status:  new
  Priority:  high      |  Milestone:  PostGIS 3.5.1
 Component:  topology  |    Version:  3.5.x
Resolution:            |   Keywords:
-----------------------+---------------------------
Comment (by strk):

 The test:
 {{{
 select NULL FROM topology.DropTopology ('t5792');
 select NULL FROM topology.CreateTopology ('t5792');

 SELECT NULL FROM topology.TopoGeo_addLinestring('t5792', 'LINESTRING(
 11.812075769533624 59.77938755222866,
 11.811862389533625 59.77938237222866
 )');

 SELECT NULL FROM topology.TopoGeo_addLinestring('t5792', 'LINESTRING(
 11.811862389533625 59.77938237222866,
 11.811969079533624 59.77938496222866,
 11.812075769533624 59.77938755222866
 )');

 SELECT * FROM ValidateTopology('t5792');  -- topology is valid here

 BEGIN;

 -- This breaks the topology
 SELECT NULL FROM topology.TopoGeo_addPoint('t5792',
 'POINT(11.812029186127067 59.7793864213727)');

 SELECT * FROM ValidateTopology('t5792'); -- topology is INVALID here
 }}}

 The introduced invalidities are reported as:
 {{{
              error              | id1 | id2
 --------------------------------+-----+-----
  universal face has shell rings |   0 |
  face has wrong mbr             |   1 |
  hole not in advertised face    |  -3 |
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5792#comment:1>
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