Class: QgsCesiumUtils

class qgis.core.QgsCesiumUtils

Bases: sip.wrapper

Contains utilities for working with Cesium data.

Added in version 3.34:

Methods

extractGltfFromB3dm

Extracts GLTF binary data and other contents from the legacy b3dm (Batched 3D Model) tile format.

extractGltfFromTileContent

Parses tile content.

parseBox

Parses a box object from a Cesium JSON document to an oriented bounding box.

parseRegion

Parses a region object from a Cesium JSON document to a 3D box.

parseSphere

Parses a sphere object from a Cesium JSON document.

transformSphere

Applies a transform to a sphere.

class B3DMContents
class B3DMContents(QgsCesiumUtils.B3DMContents)

Bases: sip.wrapper

gltf
rtcCenter
class TileContents
class TileContents(QgsCesiumUtils.TileContents)

Bases: sip.wrapper

gltf
rtcCenter
extractGltfFromB3dm(tileContent: QByteArray | bytes | bytearray) QgsCesiumUtils.B3DMContents

Extracts GLTF binary data and other contents from the legacy b3dm (Batched 3D Model) tile format. Returns empty byte array on error.

Parameters:

tileContent (Union[QByteArray)

Return type:

QgsCesiumUtils.B3DMContents

extractGltfFromTileContent(tileContent: QByteArray | bytes | bytearray) QgsCesiumUtils.TileContents

Parses tile content. Returns empty byte array on error.

Note

cmpt, pnts, i3dm tile types are currently not supported

Parameters:

tileContent (Union[QByteArray)

Return type:

QgsCesiumUtils.TileContents

parseBox(box: Iterable[Any]) QgsOrientedBox3D

Parses a box object from a Cesium JSON document to an oriented bounding box.

Parameters:

box (Iterable[Any])

Return type:

QgsOrientedBox3D

parseRegion(region: Iterable[Any]) QgsBox3D

Parses a region object from a Cesium JSON document to a 3D box.

Parameters:

region (Iterable[Any])

Return type:

QgsBox3D

parseSphere(sphere: Iterable[Any]) QgsSphere

Parses a sphere object from a Cesium JSON document.

Parameters:

sphere (Iterable[Any])

Return type:

QgsSphere

transformSphere(sphere: QgsSphere, transform: QgsMatrix4x4) QgsSphere

Applies a transform to a sphere.

Parameters:
Return type:

QgsSphere