Name

ST_Dimension — ST_Geometry 값의 좌표 차원을 반환합니다.

Synopsis

integer ST_Dimension(geometry g);

설명

좌표 차원과 동등하거나 낮아야 하는, 해당 도형 객체의 내재된 차원을 반환합니다. OGC 사양서 s2.1.1.1 단원을 보면 POINT 는 0, LINESTRING 은 1, POLYGON 은 2, 그리고 GEOMETRYCOLLECTION 의 경우 구성 요소 가운데 가장 높은 차원입니다. 알려지지 않은 (텅 빈) 도형인 경우 null을 반환합니다.

This method implements the SQL/MM specification. SQL-MM 3: 5.1.2

[Note]

A TIN, including a closed TIN surface, is a surface geometry and has dimension 2. Use CG_MakeSolid to make the solid representation explicit; the resulting 3D solid has dimension 3. Solid geometry semantics, such as volume, are handled separately by the SQL/MM 3D solid functions (SQL-MM IEC 13249-3: 9.1).

개선 사항: 2.0.0 버전부터 다면체 표면(polyhedral surface) 및 TIN을 지원합니다. 빈 도형이 주어져도 더 이상 예외가 발생하지 않습니다.

[Note]

2.0.0 미만 버전에서는 빈 도형에 대해 예외를 발생시켰습니다.

This function supports Polyhedral surfaces.

This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).

예시

SELECT ST_Dimension('GEOMETRYCOLLECTION(LINESTRING(1 1,0 0),POINT(0 0))');
1
SELECT ST_Dimension('TIN Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))');
2