Constructs a scene object from an OpenSceneGraph Binary (OSGB) object stored as bytea.
Syntax
Version 1 — without affine transformation
scene ST_SceneFromOSGB(bytea osgb,
integer srid default 0,
integer lod default 0)Version 2 — with affine transformation
scene ST_SceneFromOSGB(bytea osgb,
integer srid,
integer lod,
float8[] affine)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
osgb | bytea | — | The OSG object in binary representation. |
srid | integer | 0 | The spatial reference identifier (SRID). |
lod | integer | 0 | The Level of Detail (LOD) level. |
affine | float8[] | — | An array of affine transformation values. Must contain exactly 12 or 16 values. See Usage notes for details. |
Returns
Returns a value of type scene. A scene object represents a 3D spatial scene and can be passed to spatial query functions such as Box3D.
Usage notes
The
affineparameter must contain exactly 12 or 16 values.If
affinecontains 16 values, the last four values are ignored. Only the first 12 values are applied.
Examples
Query the 3D bounding box of a scene constructed from an OSGB binary:
SELECT Box3D(ST_SceneFromOSGB('\xa10e916c4545fb1a0...'));Output:
box3d
--------------------------------------------
BOX3D(-156.239562988281 63.6093330383301 -32.4500007629395,-53.4085960388184 166.440292358398 29.9221706390381)See also
Box3D— returns the 3D bounding box of a geometry or scene object
该文章对您有帮助吗?