ST_GetFaceEdges — Returns a set of ordered edges that bound aface.
getfaceedges_returntype ST_GetFaceEdges(varchar atopology, bigint aface);
Returns a set of ordered edges that bound aface. Each output consists of a sequence and edgeid. Sequence numbers start with value 1.
Enumeration of each ring edges start from the edge with smallest identifier. Order of edges follows a left-hand-rule (bound face is on the left of each directed edge).
Availability: 2.0
This method implements the SQL/MM specification.
SQL-MM 3 Topo-Geo and Topo-Net 3: Routine Details: X.3.5
This query returns the edges that bound face 1.
SELECT (topology.ST_GetFaceEdges('tt', 1)).*;
sequence | edge
----------+------
1 | -4
2 | 5
3 | 7
4 | -6
5 | 1
6 | 2
7 | 3
This query returns the sequence, edge identifier, and geometry of the edges that bound face 1. Use ST_GetFaceGeometry if only the geometry and sequence are needed.
SELECT t.seq, t.edge, geom
FROM topology.ST_GetFaceEdges('tt', 1) As t(seq, edge)
INNER JOIN tt.edge AS e ON abs(t.edge) = e.edge_id;