Class: QgsCesiumUtils

Contains utilities for working with Cesium data.

Added in version 3.34.

Static 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 qgis.core.QgsCesiumUtils[source]

Bases: object

class B3DMContents

Bases: object

Encapsulates the contents of a B3DM file.

gltf: QByteArray

GLTF binary content

rtcCenter: QgsVector3D

Optional RTC center

class TileContents

Bases: object

Encapsulates the contents of a 3D tile.

gltf: QByteArray

GLTF binary content

rtcCenter: QgsVector3D

Center position of relative-to-center coordinates (when used)

static extractGltfFromB3dm(tileContent: QByteArray | bytes | bytearray) QgsCesiumUtils.B3DMContents[source]

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, bytes, bytearray])

Return type:

QgsCesiumUtils.B3DMContents

static extractGltfFromTileContent(tileContent: QByteArray | bytes | bytearray) QgsCesiumUtils.TileContents[source]

Parses tile content. Returns empty byte array on error.

Note

cmpt, pnts, i3dm tile types are currently not supported

Parameters:

tileContent (Union[QByteArray, bytes, bytearray])

Return type:

QgsCesiumUtils.TileContents

static parseBox(box: Iterable[Any]) QgsOrientedBox3D[source]

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

Parameters:

box (Iterable[Any])

Return type:

QgsOrientedBox3D

static parseRegion(region: Iterable[Any]) QgsBox3D[source]

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

Parameters:

region (Iterable[Any])

Return type:

QgsBox3D

static parseSphere(sphere: Iterable[Any]) QgsSphere[source]

Parses a sphere object from a Cesium JSON document.

Parameters:

sphere (Iterable[Any])

Return type:

QgsSphere

static transformSphere(sphere: QgsSphere, transform: QgsMatrix4x4) QgsSphere[source]

Applies a transform to a sphere.

Parameters:
Return type:

QgsSphere