[postgis-tickets] [PostGIS] #5293: toTopoGeom: corrupted topology: face xxx could not be constructed only from edges knowing about it (like edge yyy).

PostGIS trac at osgeo.org
Thu Jun 1 08:11:58 PDT 2023


#5293: toTopoGeom: corrupted topology: face xxx could not be constructed only from
edges knowing about it (like edge yyy).
-----------------------+---------------------------
  Reporter:  strk      |      Owner:  strk
      Type:  defect    |     Status:  new
  Priority:  medium    |  Milestone:  PostGIS 3.4.0
 Component:  topology  |    Version:  master
Resolution:            |   Keywords:
-----------------------+---------------------------
Comment (by strk):

 This is a picture of the small incoming line found, with evidence of the
 first point of it added to the topology.
 [[Image(incomingLine.png)]]

 The problem is with adding that single point, and specifically with the
 code trying to figure out in which face that point would fall, and doing
 so by attempting to compute angles. The test thus reduces to this:
 {{{
 BEGIN; -- so it can be reproducible
 SELECT topology.TopoGeo_addPoint(
   'postgis_ticket_5293_topo',
   'SRID=4258;POINT(5.803646305 59.263416658000004)',
   0
 );
 ROLLBACK;
 }}}


 The problem seems to be with ordering the nearly cohincident edges (64 and
 65) around their node to find where the newly added node lays.

 From the logs I discover the problem being in the code computing the
 endpoint, bogusly considering the last two points of edge 64 being the
 same, due to use of p2d_same function using FP_EQUALS instead of strict
 equality.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5293#comment:11>
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