py3dtiles.tileset.content.tile_content module#

class py3dtiles.tileset.content.tile_content.LegacyTileContent[source]#

Bases: TileContent

body: TileContentBody#
abstract classmethod from_array(array: ndarray[tuple[int, ...], dtype[uint8]]) Self[source]#
classmethod from_bytes(data: bytes) Self[source]#

Load a tile_content from bytes. This method can be directly supplied the bytes in the file.

get_batch_table_binary_property(name: str) ndarray[tuple[int, ...], dtype[Any]][source]#

Get a binary property from a batch table. Internally forward to self.body.batch_table.get_binary_property(name).

get_extra_field_names() set[str][source]#
header: TileContentHeader#
save_as(path: Path) None[source]#

Save the tile content to a file.

abstract sync() None[source]#

Allow to synchronize headers with contents.

to_array() ndarray[tuple[int, ...], dtype[uint8]][source]#

Return a uint8 view of the bytes composing this tile content.

This is mainly a legacy method used to load from binary files.

class py3dtiles.tileset.content.tile_content.TileContent[source]#

Bases: ABC

abstract classmethod from_bytes(data: bytes) Self[source]#

Load a tile_content from bytes. This method can be directly supplied the bytes in the file.

classmethod from_file(tile_path: Path) Self[source]#
get_bounding_volume_box() BoundingVolumeBox | None[source]#
abstract get_colors() ndarray[tuple[int, ...], dtype[uint8 | uint16 | float32]] | None[source]#
abstract get_extra_field(fieldname: str) ndarray[tuple[int, ...], dtype[Any]] | None[source]#
abstract get_extra_field_names() set[str][source]#
abstract get_vertex_count() int[source]#
abstract get_vertices() ndarray[tuple[int, ...], dtype[float32 | uint16]] | None[source]#
abstract save_as(path: Path) None[source]#

Save the tile content to a file.

abstract to_array() ndarray[tuple[int, ...], dtype[uint8]][source]#

Return a uint8 view of the bytes composing this tile content.

This is mainly a legacy method used to load from binary files.

class py3dtiles.tileset.content.tile_content.TileContentBody[source]#

Bases: ABC

batch_table: BatchTable#
feature_table: FeatureTable[Any, Any]#
abstract to_array() ndarray[tuple[int, ...], dtype[uint8]][source]#
class py3dtiles.tileset.content.tile_content.TileContentHeader[source]#

Bases: ABC

abstract static from_array(array: ndarray[tuple[int, ...], dtype[uint8]]) TileContentHeader[source]#
magic_value: Literal[b'b3dm', b'pnts']#
abstract to_array() ndarray[tuple[int, ...], dtype[uint8]][source]#
version: int#