tiles_io – 3D Tiles Reader

3D Tiles (OGC) reader for tilesets containing Gaussian-splatting content.

Traverses a tileset.json (local file or HTTP/HTTPS URL), fetches each tile’s glTF/GLB content, and returns Tile3DContent objects.

Supports both content.uri (single content) and contents (3D Tiles 1.1 multi-content). Only explicit (non-implicit) tiling and cumulative transform matrices are implemented.

class 3dgs_io.tiles_io.BoundingVolumeBox(center, half_axes)

Bases: object

A bounding volume defined as an oriented box.

center: ndarray

Centre of the box as a 3-element float64 array (cx, cy, cz).

half_axes: ndarray

Three half-axis column vectors as a 3x3 float64 array (columns = axes).

static from_list(values)

Construct from the 12-element array used in 3D Tiles JSON.

Return type:

BoundingVolumeBox

to_dict()

Serialize to the 3D Tiles JSON boundingVolume dict.

Return type:

dict[str, list[float]]

class 3dgs_io.tiles_io.BoundingVolumeRegion(west, south, east, north, min_height, max_height)

Bases: object

A bounding volume defined as a geographic region.

Longitude and latitude values are in radians; heights are in metres above the WGS 84 ellipsoid.

west: float

Western longitude (radians).

south: float

Southern latitude (radians).

east: float

Eastern longitude (radians).

north: float

Northern latitude (radians).

min_height: float

Minimum height above the ellipsoid (metres).

max_height: float

Maximum height above the ellipsoid (metres).

static from_list(values)

Construct from the 6-element array used in 3D Tiles JSON.

Return type:

BoundingVolumeRegion

to_dict()

Serialize to the 3D Tiles JSON boundingVolume dict.

Return type:

dict[str, list[float]]

class 3dgs_io.tiles_io.BoundingVolumeSphere(center, radius)

Bases: object

A bounding volume defined as a sphere.

center: ndarray

Centre of the sphere as a 3-element float64 array (cx, cy, cz).

radius: float

Radius of the sphere (metres).

static from_list(values)

Construct from the 4-element array used in 3D Tiles JSON.

Return type:

BoundingVolumeSphere

to_dict()

Serialize to the 3D Tiles JSON boundingVolume dict.

Return type:

dict[str, list[float]]

class 3dgs_io.tiles_io.Tile3DContent(cloud, transform, content_uri, geometric_error=0.0, refine='REPLACE', bounding_volume=None)

Bases: object

A single loaded camera 3DGS tile from a 3D Tileset.

cloud: GaussianCloud

Gaussian cloud decoded from the tile’s glTF content (tile-local coords).

transform: ndarray

Cumulative 4x4 world transform (column-major, as stored in 3D Tiles).

content_uri: str

Resolved URI/path of the tile content that was loaded.

geometric_error: float = 0.0

Tile geometricError (screen-space error threshold).

refine: str = 'REPLACE'

Refinement strategy inherited from the nearest ancestor (ADD/REPLACE).

bounding_volume: BoundingVolumeBox | BoundingVolumeRegion | BoundingVolumeSphere | None = None

Parsed bounding volume from the tileset (box, region, or sphere).

3dgs_io.tiles_io.load_tileset(source, *, max_tiles=None, leaves_only=True)

Load a 3D Tileset and return its tiles.

Parameters:
  • source (str | Path) – Local path or HTTP(S) URL to a tileset.json file.

  • max_tiles (Optional[int]) – Optional cap on the number of tiles loaded (useful for large tilesets).

  • leaves_only (bool) – When True (default), only tiles without children are loaded. When False, every tile that has a content entry is loaded.

Return type:

A list of Tile3DContent.

3dgs_io.tiles_io.merge_tileset(tiles)

Merge loaded tiles into a single GaussianCloud with world-space positions.

Applies each tile’s cumulative transform to positions and rotations. Scales and other attributes are copied as-is.

Return type:

GaussianCloud