ValidateTopology — Returns a set of validatetopology_returntype objects detailing issues with topology.
setof validatetopology_returntype ValidateTopology(
varchar toponame, geometry bbox)
;
Returns a set of validatetopology_returntype objects
detailing issues with topology, optionally limiting the check to the
area specified by the bbox
parameter.
List of possible errors, what they mean and what the returned ids represent are displayed below:
Error | id1 | id2 | Meaning |
---|---|---|---|
coincident nodes | Identifier of first node. | Identifier of second node. | Two nodes have the same geometry. |
edge crosses node | Identifier of the edge. | Identifier of the node. | An edge has a node in its interior. See ST_Relate. |
invalid edge | Identifier of the edge. | An edge geometry is invalid. See ST_IsValid. | |
edge not simple | Identifier of the edge. | An edge geometry has self-intersections. See ST_IsSimple. | |
edge crosses edge | Identifier of first edge. | Identifier of second edge. | Two edges have an interior intersection. See ST_Relate. |
edge start node geometry mismatch | Identifier of the edge. | Identifier of the indicated start node. | The geometry of the node indicated as the starting node for an edge does not match the first point of the edge geometry. See ST_StartPoint. |
edge end node geometry mismatch | Identifier of the edge. | Identifier of the indicated end node. | The geometry of the node indicated as the ending node for an edge does not match the last point of the edge geometry. See ST_EndPoint. |
face without edges | Identifier of the orphaned face. | No edge reports an existing face on either of its sides (left_face, right_face). | |
face has no rings | Identifier of the partially-defined face. | Edges reporting a face on their sides do not form a ring. | |
face has wrong mbr | Identifier of the face with wrong mbr cache. | Minimum bounding rectangle of a face does not match minimum bounding box of the collection of edges reporting the face on their sides. | |
hole not in advertised face | Signed identifier of an edge, identifying the ring. See GetRingEdges. | A ring of edges reporting a face on its exterior is contained in different face. | |
not-isolated node has not- containing_face | Identifier of the ill-defined node. | A node which is reported as being on the boundary of one or more edges is indicating a containing face. | |
isolated node has containing_face | Identifier of the ill-defined node. | A node which is not reported as being on the boundary of any edges is lacking the indication of a containing face. | |
isolated node has wrong containing_face | Identifier of the misrepresented node. | A node which is not reported as being on the boundary of any edges indicates a containing face which is not the actual face containing it. See GetFaceContainingPoint. | |
invalid next_right_edge | Identifier of the misrepresented edge. | Signed id of the edge which should be indicated as the next right edge. | The edge indicated as the next edge encountered walking on the right side of an edge is wrong. |
invalid next_left_edge | Identifier of the misrepresented edge. | Signed id of the edge which should be indicated as the next left edge. | The edge indicated as the next edge encountered walking on the left side of an edge is wrong. |
mixed face labeling in ring | Signed identifier of an edge, identifying the ring. See GetRingEdges. | Edges in a ring indicate conflicting faces on the walking side. This is also known as a "Side Location Conflict". | |
non-closed ring | Signed identifier of an edge, identifying the ring. See GetRingEdges. | A ring of edges formed by following next_left_edge/next_right_edge attributes starts and ends on different nodes. | |
face has multiple shells | Identifier of the contended face. | Signed identifier of an edge, identifying the ring. See GetRingEdges. | More than a one ring of edges indicate the same face on its interior. |
Availability: 1.0.0
Enhanced: 2.0.0 more efficient edge crossing detection and fixes for false positives that were existent in prior versions.
Changed: 2.2.0 values for id1 and id2 were swapped for 'edge crosses node' to be consistent with error description.
Changed: 3.2.0 added optional bbox parameter, perform face labeling and edge linking checks.
SELECT * FROM topology.ValidateTopology('ma_topo'); error | id1 | id2 -------------------+-----+----- face without edges | 1 |