py3dtiles.tileset.tile module#
- class py3dtiles.tileset.tile.Tile(geometric_error: float = 500, bounding_volume: BoundingVolume[Any] | None = None, transform: npt.NDArray[np.float64] = array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]), refine_mode: RefineType = 'ADD', content_uri: Path | None = None)[source]#
Bases:
RootProperty
[TileDictType
]Represents a Tile in the 3dtiles specs
- delete_on_disk(root_uri: Path, delete_sub_tileset: bool = False) None [source]#
Deletes all files linked to the tile and its children. The uri of the folder where tileset is, should be defined.
- Parameters:
root_uri – The folder where tileset is.
delete_sub_tileset – If True, all tilesets present as tile content will be removed as well as their content. If False, the linked tilesets in tiles won’t be removed.
- classmethod from_dict(tile_dict: TileDictType) Tile [source]#
- get_all_children() list[Tile] [source]#
- Returns:
the recursive (across the children tree) list of the children tiles
- get_or_fetch_content(root_uri: Path | None) TileContent | TileSet [source]#
If a tile_content content has been set, returns this content. If the tile content is None and a tile_content uri has been set, the tile will load the file and return its content.
- Parameters:
root_uri – the base uri which tile.content_uri is relative to. Usually the directory containing the tileset containing this tile.
- get_transformed_bounding_volume() BoundingVolume[Any] [source]#
Get the bounding volume of this tile, transformed according to this tile transformation.
This bounding volume is therefore in the parent’s local coordinate system, possibly the world coordinate if this tile has no parent.
- to_dict() TileDictType [source]#
- transform_coord(coord: ndarray[Any, dtype[T]]) ndarray[Any, dtype[T]] [source]#
Transform one coordinate according to this tile transformation property.
NOTE: this only applies the current tile transformation, not the transformation of ancestors