Converts a scene object to a binary file in Batched 3D Model (B3DM) format, which can be served as a 3D Tiles tile and consumed by renderers such as Cesium.
Syntax
bytea ST_AsB3DM(scene sceneObject);Parameters
| Parameter | Description |
|---|---|
sceneObject | A scene object of type scene. Must be of subtype osg. To construct this input from an OSGB binary, call ST_sceneFromOSGB. |
Description
ST_AsB3DM serializes a scene object into a B3DM binary file. The output is a bytea value containing a valid B3DM tile, with the FeatureTable length set to 0.
Only scene objects of subtype osg are supported. To construct an osg scene object from raw OSGB data, call ST_sceneFromOSGB first.
Example
SELECT ST_AsB3DM(ST_sceneFromOSGB('\xa10e916c4545fb1a0...'));Output:
\x6233646d01000000.....Usage notes
The FeatureTable in the output B3DM file has a length of 0.
Only
osg-type scene objects are supported.
See also
ST_sceneFromOSGB— construct a scene object from an OSGB binary
该文章对您有帮助吗?