Opened 7 years ago

Closed 7 years ago

#978 closed enhancement (fixed)

ST_AddIsoEdge should raise an exception if any of the two given nodes has containing_face=null

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: topology Version: trunk
Keywords: Cc:

Description

Based on standard description for ST_AddIsoEdge you can't use the function to create a non-isolated edge, which is an edge whose endnodes are shared with another edge.

Rather than computing this sharing, the function could use the node's "containing_face" field to tell if it was isolated or not. Doing so would speed up operations and catch malformed topologies earlier rather than tolerating them.

Attachments (1)

patch_ST_AddIsoNode.zip (3.3 KB) - added by aperi2007 7 years ago.
Patch for ST_AddIsoNode

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by aperi2007

I surely agree. :)

The containing_face is NULL when a node is not-isolated. So if a node has containing_face=NULL cannot create an Isolated-Edge.

When a node is not-isolate (containing_face=NULL) the right functions to use are ST_AddEdgeNewFaces or ST_AddEdgeModFaces.

comment:2 Changed 7 years ago by strk

only we need ST_AddIsoNode fixed before proceeding with this, or would be impossible to construct a topology...

Changed 7 years ago by aperi2007

Attachment: patch_ST_AddIsoNode.zip added

Patch for ST_AddIsoNode

comment:3 Changed 7 years ago by aperi2007

I add the patch to this ticket. http://trac.osgeo.org/postgis/attachment/ticket/978/patch_ST_AddIsoNode.zip

I patch the function and the sqlmm.sql, but also add a new regress test ST_AddIsoNode.sql with others tests for an Isolated Node.

comment:4 Changed 7 years ago by strk

Status: newassigned

comment:5 Changed 7 years ago by strk

Resolution: fixed
Status: assignedclosed

Fixed in r7223.

Note: See TracTickets for help on using tickets.