全部產品
Search
文件中心

:ST_AsBinary

更新時間:Feb 28, 2024

將各種資料類型轉為二進位格式。

文法

bytea ST_AsBinary(meshgeom geom);
bytea ST_AsBinary(sfmesh sfmeshObject);
bytea ST_AsBinary(material material);
bytea ST_AsBinary(texture texture);
bytea ST_AsBinary(meshgeom geom, cstring endian);
bytea ST_AsBinary(sfmesh sfmeshObject, cstring endian);
bytea ST_AsBinary(material material, cstring endian);
bytea ST_AsBinary(texture texture, cstring endian);

參數

參數名稱描述
geommeshgeom對象。
sfmeshObjectsfmesh對象。
materialmaterial對象。
texturetexture對象。
endian大小端,取值為:
  • 'NDR':little endian
  • 'XDR':big endian

描述

將各種資料類型轉為二進位格式,功能等同於強制類型轉換::bytea

樣本

select ST_AsBinary(ST_MeshFromText('{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}'));

------------------------------------------------------------------------------
\x014d0102...