Name

ST_InteriorRingN — 返回多边形的第N个内环(孔)。

Synopsis

geometry ST_InteriorRingN ( geometry a_polygon , integer n ) ;

描述

将多边形几何体的第N个内环(孔)作为LINESTRING返回。索引从1开始。如果几何图形不是多边形或索引超出范围,则返回NULL。

[Note]

此函数不支持MULTIPOLYGON。对于与一起使用的MULTIPOLYGON ST_GeometryN ST_Dump

This method implements the OGC Simple Features Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3:8.2.6、8.3.5

This function supports 3d and will not drop the z-index.

示例

SELECT ST_AsText(ST_InteriorRingN(geom, 1)) As geom
FROM (SELECT ST_BuildArea(
                ST_Collect(ST_Buffer(ST_Point(1,2), 20,3),
                        ST_Buffer(ST_Point(1, 2), 10,3))) As geom
                )  as foo;
                

另请参阅

ST_ExteriorRing , ST_BuildArea , ST_Collect , ST_Dump , ST_NumInteriorRing , ST_NumInteriorRings