Opened 3 years ago

Last modified 3 weeks ago

#4934 new task

Deprecate topology function creating invalid topologies

Reported by: strk Owned by: robe
Priority: medium Milestone: PostGIS 3.5.0
Component: topology Version: 2.5.x -- EOL
Keywords: Cc:

Description (last modified by strk)

Some topology functions are creating invalid topologies, and are documented to do so. They were written before SQL/MM full specification was implemented, so it wasn't that easy to create valid topologies.

Nowadays those functions just make it harder to maintain the codebase as there are testcases proving the functionality of some of them still works in presence of invalid topologies and we impelment code to ensure invalid topologies are still somehow handled. Better stop now :)

Such functions are (list to be grown I guess):

  • AddEdge (does not do edge linking nor face labeling)
  • AddNode (allows inserting isolated nodes with wrong containing_face)
  • AddFace (allows leaving unresolved dangling edges)

Another idea would be to *allow* creating invalid topology but somehow encode the kind of invalidity when doing so. For example in the AddLineStringNoFace function used as part of the proposed https://git.osgeo.org/gitea/postgis/postgis/pulls/28 change we encode the concept of "unknown side faces" by using the -1 pivot value in the left_face and right_face of edges with such unknown faces.

Change History (4)

comment:1 by strk, 3 years ago

Description: modified (diff)

comment:2 by strk, 3 years ago

Description: modified (diff)

comment:3 by strk, 3 years ago

Milestone: PostGIS 3.2.0PostGIS Fund Me

comment:4 by robe, 3 weeks ago

Milestone: PostGIS Fund MePostGIS 3.5.0
Owner: changed from strk to robe
Type: enhancementtask

I've put in the docs that AddEdge is now deprecated and TopoGeo_AddLineString should be used instead at [2e4d9639/git]. Still need to change the function to show a deprecated notice

Note: See TracTickets for help on using tickets.