py3dtiles.tile module

class py3dtiles.tile.Tile(geometric_error=500, bounding_volume=None, refine_mode='ADD')[source]

Bases: Extendable

add_child(tile: Tile) None[source]
get_children() list[Tile][source]
Returns:

the recursive (across the children tree) list of the children tiles

get_content() TileContent[source]
get_content_uri() str[source]
get_direct_children() list[Tile][source]
get_refine_mode() str[source]
get_transform() list[float][source]
has_children() bool[source]
set_content(content: TileContent, force=True) None[source]
set_content_uri(uri: str) None[source]
set_refine_mode(mode: str) None[source]
set_transform(transform: list[float]) None[source]
Parameters:

transform – a flattened transformation matrix

Returns:

sync_bounding_volume_with_children() None[source]
to_dict() dict[source]
write_content(directory: Path) None[source]

Write (or overwrite) the tile _content_ to the directory specified as parameter and withing the relative filename designated by the tile’s content uri. Note that it is the responsibility of the owning TileSet to

  • set those uris

  • to explicitly invoke write_content() (this is to be opposed with the Tile attributes which get serialized when recursing on the TileSet attributes) :param directory: the target directory