ST_GetFaceEdges — 返回一个有序的边集合,这些边限定了 aface。
getfaceedges_returntype ST_GetFaceEdges(varchar atopology, integer aface);
返回一个有序的边集合,这些边限定了 aface。每个输出包含一个序列号和边 ID。序列号从 1 开始。
每个环的边的枚举从具有最小标识符的边开始。边的顺序遵循左手规则(边界面在每个有向边的左侧)。
可用性: 2.0
这个方法实现了 SQL/MM 规范。SQL-MM 3 Topo-Geo 和 Topo-Net 3:例程详细信息:X.3.5
-- Returns the edges bounding face 1
SELECT (topology.ST_GetFaceEdges('tt', 1)).*;
-- result --
sequence | edge
----------+------
1 | -4
2 | 5
3 | 7
4 | -6
5 | 1
6 | 2
7 | 3
(7 rows)
-- Returns the sequence, edge id
-- and geometry of the edges that bound face 1
-- If you just need geom and seq, can use ST_GetFaceGeometry
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;