제목

ST_AsX3D — 도형을 X3D XML 노드 요소 형식: ISO-IEC-19776-1.2-X3DEncodings-XML로 반환합니다.

요약

text ST_AsX3D(geometry g1, integer maxdecimaldigits=15, integer options=0);

설명

도형을 http://www.web3d.org/standards/number/19776-1 에서 정의하는 X3D XML 형식화 노드 요소로 반환합니다. maxdecimaldigits (정밀도)를 설정하지 않을 경우 기본값인 15를 씁니다.

[참고]

X3D 도형 유형이 PostGIS 도형 유형을 직접 매핑하지 않기 때문에 PostGIS 도형을 X3D 도형으로 번역하는 다양한 방법이 있습니다. 또 현재 렌더링 도구 대부분이 새로운 X3D 유형을 지원하지 않기 때문에, 더 잘 매핑돼 있는 몇몇 X3D 유형을 다루지 않습니다. 이 단원에서 다루는 것이 우리가 결정한 매핑입니다. 사용자가 선호하는 매핑을 표시할 수 있게 해주는 아이디어나 방법이 떠올랐다면 부디 버그 티켓(bug ticket)을 포스팅해주십시오.

다음은 현재 PostGIS 2D/3D 유형을 X3D 유형으로 매핑하는 방법입니다.

The 'options' argument is a bitfield that denotes whether to represent coordinates with the X3D GeoCoordinates geospatial node and whether to flip the x/y axis. By default, ST_AsX3D outputs in database form (long,lat or X,Y), but the X3D default of lat/lon, y/x may be preferred.

  • 0: 데이터베이스 순서로 정렬된 X/Y(예를 들어 경도/위도 = X,Y가 표준 데이터베이스 순서입니다), 데이터 값, 비(非) 공간 좌표(구식 정규 좌표 태그).

  • 1: X 및 Y를 뒤집습니다. 지리좌표(GeoCoordinate) 옵션 스위치와 연결해서 사용할 경우, 출력물이 기본값인 "latitude_first"(위도 먼저)가 될 것이고 좌표도 마찬가지로 뒤집힐 것입니다.

  • 2: 좌표를 지리공간 지리좌표로 출력합니다. 도형이 WGS84 경위도(SRID 4326)가 아닐 경우, 이 옵션은 오류를 발생시킬 것입니다. 현재 이 지리좌표 유형만 지원합니다. 공간 참조 시스템을 정의하는 X3D 사양 을 참조하십시오. 출력물은 기본적으로 GeoCoordinate geoSystem='"GD" "WE" "longitude_first"' 가 됩니다. X3D 기본값인 GeoCoordinate geoSystem='"GD" "WE" "latitude_first"' 를 선호한다면, (2 + 1) = 3 을 쓰십시오.

PostGIS 유형 2D X3D 유형 3D X3D 유형
LINESTRING 아직 구현되지 않았습니다. 구현시 PolyLine2D가 될 것입니다. LineSet
MULTILINESTRING 아직 구현되지 않았습니다. 구현시 PolyLine2D가 될 것입니다. IndexedLineSet
MULTIPOINT Polypoint2D PointSet
POINT 공백으로 구분된 좌표를 출력합니다. 공백으로 구분된 좌표를 출력합니다.
(MULTI) POLYGON, POLYHEDRALSURFACE 유효하지 않은 X3D 마크업(markup)입니다. IndexedFaceSet (현재 내곽 고리를 또다른 면 집합(faceset)으로 출력합니다.)
TIN TriangleSet2D (아직 구현되지 않았습니다.) IndexedTriangleSet
[참고]

2차원 도형 지원이 아직 완성되지 않았습니다. 현재 내곽 고리를 그저 개별적인 폴리곤으로 그립니다. 이 부분은 현재 작업중입니다.

Lots of advancements happening in 3D space particularly with X3D Integration with HTML5

또 렌더링된 도형을 보는 데 이용할 수 있는 멋진 오픈소스 X3D 뷰어가 있습니다. 맥, 리눅스, 윈도우 용 Free Wrl 바이너리를 http://freewrl.sourceforge.net/ 에서 다운로드할 수 있습니다. 도형을 보기 위해 패키징된 FreeWRL_Launcher를 이용하십시오.

Also check out PostGIS minimalist X3D viewer that utilizes this function and x3dDom html/js open source toolkit.

2.0.0 버전부터 ISO-IEC-19776-1.2-X3DEncodings-XML을 이용할 수 있습니다.

개선 사항: 2.2.0 버전부터 지리좌표 및 축(x/y, 경도/위도) 뒤집기를 지원합니다. 자세한 내용은 옵션을 살펴보십시오.

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

This function supports Polyhedral surfaces.

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

예시

Create a complete X3D document containing a cube that is viewable in FreeWRL and other X3D viewers.

Code
SELECT '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D>
  <Scene>
    <Transform>
      <Shape>
       <Appearance>
            <Material emissiveColor=''0 0 1''/>
       </Appearance
> ' ||
       ST_AsX3D(ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)),
((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)),
((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)),
((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )')) ||
      '</Shape>
    </Transform>
  </Scene>
</X3D
>' As x3ddoc;
래스터 출력
    x3ddoc
    --------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D>
  <Scene>
    <Transform>
      <Shape>
       <Appearance>
            <Material emissiveColor='0 0 1'/>
       </Appearance>
       <IndexedFaceSet  coordIndex='0 1 2 3 -1 4 5 6 7 -1 8 9 10 11 -1 12 13 14 15 -1 16 17 18 19 -1 20 21 22 23'>
            <Coordinate point='0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1 0 0 1 1 1 1 1 1 1 0 0 0 1 1 0 1 1 1 1 0 1 1' />
      </IndexedFaceSet>
      </Shape>
    </Transform>
  </Scene>
</X3D>

PostGIS buildings.

Copy and paste the output of this query to x3d scene viewer and click Show

Code
SELECT string_agg('<Shape
>' || ST_AsX3D(CG_Extrude(geom, 0,0, i*0.5)) ||
    '<Appearance>
          <Material diffuseColor="' || (0.01*i)::text || ' 0.8 0.2" specularColor="' || (0.05*i)::text || ' 0 0.5"/>
        </Appearance>
    </Shape
>', '')
FROM ST_Subdivide(ST_Letters('PostGIS'),20) WITH ORDINALITY AS f(geom,i);

The following preview shows the extruded geometry generated from a simplified version of the same source lettering. It is a geometry preview, not X3D markup; use the preceding ST_AsX3D query output in an X3D viewer to inspect the native X3D scene.

Code
SELECT
    CG_Extrude(
        ST_SimplifyPreserveTopology(ST_Letters('PostGIS'), 2),
        0, 0, 10
    ) AS buildings;
래스터 출력
GEOMETRYCOLLECTION Z (POLYHEDRALSURFACE Z (((42.6 39.2 0,36.3 24.5 0,17 20.3 0,17.9 0 0,0 0 0,0 73.8 0,27.3 73.6 0,36.3 70 0,41.8 61.6 0,42.6 39.2 0),(26.5 55.7 0,17 58.8 0,17 35.3 0,25.6 36.2 0,26.5 55.7 0)),((42.6 39.2 10,41.8 61.6 10,36.3 70 10,27.3 73.6 10,0 73.8 10,0 0 10,17.9 0 10,17 20.3 10,36.3 24.5 10,42.6 39.2 10),(26.5 55.7 10,25.6 36.2 10,17 35.3 10,17 58.8 10,26.5 55.7 10)),((42.6 39.2 0,42.6 39.2 10,36.3 24.5 10,36.3 24.5 0,42.6 39.2 0)),((36.3 24.5 0,36.3 24.5 10,17 20.3 10,17 20.3 0,36.3 24.5 0)),((17 20.3 0,17 20.3 10,17.9 0 10,17.9 0 0,17 20.3 0)),((17.9 0 0,17.9 0 10,0 0 10,0 0 0,17.9 0 0)),((0 0 0,0 0 10,0 73.8 10,0 73.8 0,0 0 0)),((0 73.8 0,0 73.8 10,27.3 73.6 10,27.3 73.6 0,0 73.8 0)),((27.3 73.6 0,27.3 73.6 10,36.3 70 10,36.3 70 0,27.3 73.6 0)),((36.3 70 0,36.3 70 10,41.8 61.6 10,41.8 61.6 0,36.3 70 0)),((41.8 61.6 0,41.8 61.6 10,42.6 39.2 10,42.6 39.2 0,41.8 61.6 0)),((26.5 55.7 0,26.5 55.7 10,17 58.8 10,17 58.8 0,26.5 55.7 0)),((17 58.8 0,17 58.8 10,17 35.3 10,17 35.3 0,17 58.8 0)),((17 35.3 0,17 35.3 10,25.6 36.2 10,25.6 36.2 0,17 35.3 0)),((25.6 36.2 0,25.6 36.2 10,26.5 55.7 10,26.5 55.7 0,25.6 36.2 0))),POLYHEDRALSURFACE Z (((69.01 58 0,84.51 52.5 0,89.71 39.9 0,87.81 9.7 0,81.71 2.9 0,71.31 -0.5 0,54.91 3.9 0,48.31 17.8 0,50.61 48.7 0,58.01 55.6 0,69.01 58 0),(73.91 38.9 0,69.11 42.6 0,64.21 38.9 0,64.21 18.9 0,68.91 15.2 0,73.91 18.9 0,73.91 38.9 0)),((69.01 58 10,58.01 55.6 10,50.61 48.7 10,48.31 17.8 10,54.91 3.9 10,71.31 -0.5 10,81.71 2.9 10,87.81 9.7 10,89.71 39.9 10,84.51 52.5 10,69.01 58 10),(73.91 38.9 10,73.91 18.9 10,68.91 15.2 10,64.21 18.9 10,64.21 38.9 10,69.11 42.6 10,73.91 38.9 10)),((69.01 58 0,69.01 58 10,84.51 52.5 10,84.51 52.5 0,69.01 58 0)),((84.51 52.5 0,84.51 52.5 10,89.71 39.9 10,89.71 39.9 0,84.51 52.5 0)),((89.71 39.9 0,89.71 39.9 10,87.81 9.7 10,87.81 9.7 0,89.71 39.9 0)),((87.81 9.7 0,87.81 9.7 10,81.71 2.9 10,81.71 2.9 0,87.81 9.7 0)),((81.71 2.9 0,81.71 2.9 10,71.31 -0.5 10,71.31 -0.5 0,81.71 2.9 0)),((71.31 -0.5 0,71.31 -0.5 10,54.91 3.9 10,54.91 3.9 0,71.31 -0.5 0)),((54.91 3.9 0,54.91 3.9 10,48.31 17.8 10,48.31 17.8 0,54.91 3.9 0)),((48.31 17.8 0,48.31 17.8 10,50.61 48.7 10,50.61 48.7 0,48.31 17.8 0)),((50.61 48.7 0,50.61 48.7 10,58.01 55.6 10,58.01 55.6 0,50.61 48.7 0)),((58.01 55.6 0,58.01 55.6 10,69.01 58 10,69.01 58 0,58.01 55.6 0)),((73.91 38.9 0,73.91 38.9 10,69.11 42.6 10,69.11 42.6 0,73.91 38.9 0)),((69.11 42.6 0,69.11 42.6 10,64.21 38.9 10,64.21 38.9 0,69.11 42.6 0)),((64.21 38.9 0,64.21 38.9 10,64.21 18.9 10,64.21 18.9 0,64.21 38.9 0)),((64.21 18.9 0,64.21 18.9 10,68.91 15.2 10,68.91 15.2 0,64.21 18.9 0)),((68.91 15.2 0,68.91 15.2 10,73.91 18.9 10,73.91 18.9 0,68.91 15.2 0)),((73.91 18.9 0,73.91 18.9 10,73.91 38.9 10,73.91 38.9 0,73.91 18.9 0))),POLYHEDRALSURFACE Z (((111.02 37.6 0,123.92 31.1 0,130.72 20.8 0,126.82 5.3 0,116.02 -0.3 0,94.02 3.7 0,98.82 18.9 0,112.52 15.3 0,115.02 17.6 0,98.72 29.6 0,96.12 45.4 0,100.52 53 0,107.32 57.1 0,128.92 54.7 0,122.72 39.9 0,112.02 42.1 0,111.02 37.6 0)),((111.02 37.6 10,112.02 42.1 10,122.72 39.9 10,128.92 54.7 10,107.32 57.1 10,100.52 53 10,96.12 45.4 10,98.72 29.6 10,115.02 17.6 10,112.52 15.3 10,98.82 18.9 10,94.02 3.7 10,116.02 -0.3 10,126.82 5.3 10,130.72 20.8 10,123.92 31.1 10,111.02 37.6 10)),((111.02 37.6 0,111.02 37.6 10,123.92 31.1 10,123.92 31.1 0,111.02 37.6 0)),((123.92 31.1 0,123.92 31.1 10,130.72 20.8 10,130.72 20.8 0,123.92 31.1 0)),((130.72 20.8 0,130.72 20.8 10,126.82 5.3 10,126.82 5.3 0,130.72 20.8 0)),((126.82 5.3 0,126.82 5.3 10,116.02 -0.3 10,116.02 -0.3 0,126.82 5.3 0)),((116.02 -0.3 0,116.02 -0.3 10,94.02 3.7 10,94.02 3.7 0,116.02 -0.3 0)),((94.02 3.7 0,94.02 3.7 10,98.82 18.9 10,98.82 18.9 0,94.02 3.7 0)),((98.82 18.9 0,98.82 18.9 10,112.52 15.3 10,112.52 15.3 0,98.82 18.9 0)),((112.52 15.3 0,112.52 15.3 10,115.02 17.6 10,115.02 17.6 0,112.52 15.3 0)),((115.02 17.6 0,115.02 17.6 10,98.72 29.6 10,98.72 29.6 0,115.02 17.6 0)),((98.72 29.6 0,98.72 29.6 10,96.12 45.4 10,96.12 45.4 0,98.72 29.6 0)),((96.12 45.4 0,96.12 45.4 10,100.52 53 10,100.52 53 0,96.12 45.4 0)),((100.52 53 0,100.52 53 10,107.32 57.1 10,107.32 57.1 0,100.52 53 0)),((107.32 57.1 0,107.32 57.1 10,128.92 54.7 10,128.92 54.7 0,107.32 57.1 0)),((128.92 54.7 0,128.92 54.7 10,122.72 39.9 10,122.72 39.9 0,128.92 54.7 0)),((122.72 39.9 0,122.72 39.9 10,112.02 42.1 10,112.02 42.1 0,122.72 39.9 0)),((112.02 42.1 0,112.02 42.1 10,111.02 37.6 10,111.02 37.6 0,112.02 42.1 0))),POLYHEDRALSURFACE Z (((156.82 17.7 0,167.02 16 0,167.02 -0.9 0,149.22 2 0,141.42 11.3 0,141.12 42.7 0,134.62 41.8 0,134.62 58.9 0,141.12 57.9 0,140.02 75.4 0,157.92 75.4 0,156.82 57.9 0,166.02 58.9 0,166.02 41.8 0,156.82 42.7 0,156.82 17.7 0)),((156.82 17.7 10,156.82 42.7 10,166.02 41.8 10,166.02 58.9 10,156.82 57.9 10,157.92 75.4 10,140.02 75.4 10,141.12 57.9 10,134.62 58.9 10,134.62 41.8 10,141.12 42.7 10,141.42 11.3 10,149.22 2 10,167.02 -0.9 10,167.02 16 10,156.82 17.7 10)),((156.82 17.7 0,156.82 17.7 10,167.02 16 10,167.02 16 0,156.82 17.7 0)),((167.02 16 0,167.02 16 10,167.02 -0.9 10,167.02 -0.9 0,167.02 16 0)),((167.02 -0.9 0,167.02 -0.9 10,149.22 2 10,149.22 2 0,167.02 -0.9 0)),((149.22 2 0,149.22 2 10,141.42 11.3 10,141.42 11.3 0,149.22 2 0)),((141.42 11.3 0,141.42 11.3 10,141.12 42.7 10,141.12 42.7 0,141.42 11.3 0)),((141.12 42.7 0,141.12 42.7 10,134.62 41.8 10,134.62 41.8 0,141.12 42.7 0)),((134.62 41.8 0,134.62 41.8 10,134.62 58.9 10,134.62 58.9 0,134.62 41.8 0)),((134.62 58.9 0,134.62 58.9 10,141.12 57.9 10,141.12 57.9 0,134.62 58.9 0)),((141.12 57.9 0,141.12 57.9 10,140.02 75.4 10,140.02 75.4 0,141.12 57.9 0)),((140.02 75.4 0,140.02 75.4 10,157.92 75.4 10,157.92 75.4 0,140.02 75.4 0)),((157.92 75.4 0,157.92 75.4 10,156.82 57.9 10,156.82 57.9 0,157.92 75.4 0)),((156.82 57.9 0,156.82 57.9 10,166.02 58.9 10,166.02 58.9 0,156.82 57.9 0)),((166.02 58.9 0,166.02 58.9 10,166.02 41.8 10,166.02 41.8 0,166.02 58.9 0)),((166.02 41.8 0,166.02 41.8 10,156.82 42.7 10,156.82 42.7 0,166.02 41.8 0)),((156.82 42.7 0,156.82 42.7 10,156.82 17.7 10,156.82 17.7 0,156.82 42.7 0))),POLYHEDRALSURFACE Z (((213.81 13.2 0,208.11 4.2 0,198.51 -0.3 0,184.21 0.9 0,174.91 8.8 0,172.61 57.4 0,175.21 66.1 0,180.91 71.6 0,209.81 74 0,209.81 58.4 0,189.11 56.8 0,188.61 18.7 0,193.81 14.8 0,199.11 16.5 0,199.11 32.2 0,193.41 32.2 0,193.41 46.4 0,213.81 46.4 0,213.81 13.2 0)),((213.81 13.2 10,213.81 46.4 10,193.41 46.4 10,193.41 32.2 10,199.11 32.2 10,199.11 16.5 10,193.81 14.8 10,188.61 18.7 10,189.11 56.8 10,209.81 58.4 10,209.81 74 10,180.91 71.6 10,175.21 66.1 10,172.61 57.4 10,174.91 8.8 10,184.21 0.9 10,198.51 -0.3 10,208.11 4.2 10,213.81 13.2 10)),((213.81 13.2 0,213.81 13.2 10,208.11 4.2 10,208.11 4.2 0,213.81 13.2 0)),((208.11 4.2 0,208.11 4.2 10,198.51 -0.3 10,198.51 -0.3 0,208.11 4.2 0)),((198.51 -0.3 0,198.51 -0.3 10,184.21 0.9 10,184.21 0.9 0,198.51 -0.3 0)),((184.21 0.9 0,184.21 0.9 10,174.91 8.8 10,174.91 8.8 0,184.21 0.9 0)),((174.91 8.8 0,174.91 8.8 10,172.61 57.4 10,172.61 57.4 0,174.91 8.8 0)),((172.61 57.4 0,172.61 57.4 10,175.21 66.1 10,175.21 66.1 0,172.61 57.4 0)),((175.21 66.1 0,175.21 66.1 10,180.91 71.6 10,180.91 71.6 0,175.21 66.1 0)),((180.91 71.6 0,180.91 71.6 10,209.81 74 10,209.81 74 0,180.91 71.6 0)),((209.81 74 0,209.81 74 10,209.81 58.4 10,209.81 58.4 0,209.81 74 0)),((209.81 58.4 0,209.81 58.4 10,189.11 56.8 10,189.11 56.8 0,209.81 58.4 0)),((189.11 56.8 0,189.11 56.8 10,188.61 18.7 10,188.61 18.7 0,189.11 56.8 0)),((188.61 18.7 0,188.61 18.7 10,193.81 14.8 10,193.81 14.8 0,188.61 18.7 0)),((193.81 14.8 0,193.81 14.8 10,199.11 16.5 10,199.11 16.5 0,193.81 14.8 0)),((199.11 16.5 0,199.11 16.5 10,199.11 32.2 10,199.11 32.2 0,199.11 16.5 0)),((199.11 32.2 0,199.11 32.2 10,193.41 32.2 10,193.41 32.2 0,199.11 32.2 0)),((193.41 32.2 0,193.41 32.2 10,193.41 46.4 10,193.41 46.4 0,193.41 32.2 0)),((193.41 46.4 0,193.41 46.4 10,213.81 46.4 10,213.81 46.4 0,193.41 46.4 0)),((213.81 46.4 0,213.81 46.4 10,213.81 13.2 10,213.81 13.2 0,213.81 46.4 0))),POLYHEDRALSURFACE Z (((235.82 72.9 0,236.82 0 0,218.52 0 0,218.52 73.8 0,235.82 72.9 0)),((235.82 72.9 10,218.52 73.8 10,218.52 0 10,236.82 0 10,235.82 72.9 10)),((235.82 72.9 0,235.82 72.9 10,236.82 0 10,236.82 0 0,235.82 72.9 0)),((236.82 0 0,236.82 0 10,218.52 0 10,218.52 0 0,236.82 0 0)),((218.52 0 0,218.52 0 10,218.52 73.8 10,218.52 73.8 0,218.52 0 0)),((218.52 73.8 0,218.52 73.8 10,235.82 72.9 10,235.82 72.9 0,218.52 73.8 0))),POLYHEDRALSURFACE Z (((258.33 49.5 0,279.93 34.6 0,283.43 25.9 0,282.53 15.4 0,277.93 6.8 0,270.73 1.6 0,252.33 0.5 0,241.53 4.9 0,246.43 20.6 0,260.73 16.4 0,266.23 18.7 0,267.43 23.2 0,245.63 39.4 0,242.03 48.6 0,242.83 59.6 0,247.53 67.3 0,257.53 73.2 0,280.43 70.8 0,275.23 56.4 0,264.53 58.3 0,258.73 55.1 0,258.33 49.5 0)),((258.33 49.5 10,258.73 55.1 10,264.53 58.3 10,275.23 56.4 10,280.43 70.8 10,257.53 73.2 10,247.53 67.3 10,242.83 59.6 10,242.03 48.6 10,245.63 39.4 10,267.43 23.2 10,266.23 18.7 10,260.73 16.4 10,246.43 20.6 10,241.53 4.9 10,252.33 0.5 10,270.73 1.6 10,277.93 6.8 10,282.53 15.4 10,283.43 25.9 10,279.93 34.6 10,258.33 49.5 10)),((258.33 49.5 0,258.33 49.5 10,279.93 34.6 10,279.93 34.6 0,258.33 49.5 0)),((279.93 34.6 0,279.93 34.6 10,283.43 25.9 10,283.43 25.9 0,279.93 34.6 0)),((283.43 25.9 0,283.43 25.9 10,282.53 15.4 10,282.53 15.4 0,283.43 25.9 0)),((282.53 15.4 0,282.53 15.4 10,277.93 6.8 10,277.93 6.8 0,282.53 15.4 0)),((277.93 6.8 0,277.93 6.8 10,270.73 1.6 10,270.73 1.6 0,277.93 6.8 0)),((270.73 1.6 0,270.73 1.6 10,252.33 0.5 10,252.33 0.5 0,270.73 1.6 0)),((252.33 0.5 0,252.33 0.5 10,241.53 4.9 10,241.53 4.9 0,252.33 0.5 0)),((241.53 4.9 0,241.53 4.9 10,246.43 20.6 10,246.43 20.6 0,241.53 4.9 0)),((246.43 20.6 0,246.43 20.6 10,260.73 16.4 10,260.73 16.4 0,246.43 20.6 0)),((260.73 16.4 0,260.73 16.4 10,266.23 18.7 10,266.23 18.7 0,260.73 16.4 0)),((266.23 18.7 0,266.23 18.7 10,267.43 23.2 10,267.43 23.2 0,266.23 18.7 0)),((267.43 23.2 0,267.43 23.2 10,245.63 39.4 10,245.63 39.4 0,267.43 23.2 0)),((245.63 39.4 0,245.63 39.4 10,242.03 48.6 10,242.03 48.6 0,245.63 39.4 0)),((242.03 48.6 0,242.03 48.6 10,242.83 59.6 10,242.83 59.6 0,242.03 48.6 0)),((242.83 59.6 0,242.83 59.6 10,247.53 67.3 10,247.53 67.3 0,242.83 59.6 0)),((247.53 67.3 0,247.53 67.3 10,257.53 73.2 10,257.53 73.2 0,247.53 67.3 0)),((257.53 73.2 0,257.53 73.2 10,280.43 70.8 10,280.43 70.8 0,257.53 73.2 0)),((280.43 70.8 0,280.43 70.8 10,275.23 56.4 10,275.23 56.4 0,280.43 70.8 0)),((275.23 56.4 0,275.23 56.4 10,264.53 58.3 10,264.53 58.3 0,275.23 56.4 0)),((264.53 58.3 0,264.53 58.3 10,258.73 55.1 10,258.73 55.1 0,264.53 58.3 0)),((258.73 55.1 0,258.73 55.1 10,258.33 49.5 10,258.33 49.5 0,258.73 55.1 0))))
Figure
Geometry figure for visual-st-asx3d-02

An Octagon elevated 3 Units and decimal precision of 6.

Code
SELECT ST_AsX3D(ST_Translate(ST_Force3D(ST_Buffer(ST_Point(10,10),5, 'quad_segs=2')), 0,0,
    3),
  6) As x3dfrag;
래스터 출력
x3dfrag
--------
<IndexedFaceSet  convex='false' coordIndex='0 1 2 3 4 5 6 7'
><Coordinate point='15 10 3 13.535534 6.464466 3 10 5 3 6.464466 6.464466 3 5 10 3 6.464466 13.535534 3 10 15 3 13.535534 13.535534 3 ' /></IndexedFaceSet>

TIN.

Code
SELECT ST_AsX3D(ST_GeomFromEWKT('TIN (((
                0 0 0,
                0 0 1,
                0 1 0,
                0 0 0
            )), ((
                0 0 0,
                0 1 0,
                1 1 0,
                0 0 0
            ))
            )')) As x3dfrag;
래스터 출력
    x3dfrag
    --------
<IndexedTriangleSet  index='0 1 2 3 4 5'
><Coordinate point='0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 1 0'/></IndexedTriangleSet>

Closed multilinestring (the boundary of a polygon with holes).

Code
SELECT ST_AsX3D(ST_GeomFromEWKT('MULTILINESTRING((20 0 10,16 -12 10,0 -16 10,-12 -12 10,-20 0 10,-12 16 10,0 24 10,16 16 10,20 0 10),
  (12 0 10,8 8 10,0 12 10,-8 8 10,-8 0 10,-8 -4 10,0 -8 10,8 -4 10,12 0 10))')
) As x3dfrag;
래스터 출력
    x3dfrag
    --------
<IndexedLineSet  coordIndex='0 1 2 3 4 5 6 7 0 -1 8 9 10 11 12 13 14 15 8'>
    <Coordinate point='20 0 10 16 -12 10 0 -16 10 -12 -12 10 -20 0 10 -12 16 10 0 24 10 16 16 10 12 0 10 8 8 10 0 12 10 -8 8 10 -8 0 10 -8 -4 10 0 -8 10 8 -4 10 ' />
 </IndexedLineSet>