Opened 13 years ago

Closed 13 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: master
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 13 years ago.
Patch for ST_AddIsoNode

Download all attachments as: .zip

Change History (6)

comment:1 by aperi2007, 13 years ago

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 by strk, 13 years ago

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

by aperi2007, 13 years ago

Attachment: patch_ST_AddIsoNode.zip added

Patch for ST_AddIsoNode

comment:3 by aperi2007, 13 years ago

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 by strk, 13 years ago

Status: newassigned

comment:5 by strk, 13 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r7223.

Note: See TracTickets for help on using tickets.