py3dtiles.tileset.tileset module

class py3dtiles.tileset.tileset.Asset(version: Literal['1.0', '1.1'] = '1.0', tileset_version: str | None = None)[source]

Bases: RootProperty[AssetDictType]

classmethod from_dict(asset_dict: AssetDictType) Self[source]
to_dict() AssetDictType[source]
class py3dtiles.tileset.tileset.TileSet(geometric_error: float = 500, root_uri: Path | None = None)[source]

Bases: RootProperty[TilesetDictType]

delete_on_disk(tileset_path: Path, delete_sub_tileset: bool = False) None[source]

Deletes all files linked to the tileset. The uri of the tileset should be defined.

Parameters:
  • tileset_path – The path of the tileset

  • 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(tileset_dict: TilesetDictType) Self[source]
static from_file(tileset_path: Path) TileSet[source]
get_all_tile_contents() Generator[TileContent | TileSet, None, None][source]
to_dict() TilesetDictType[source]

Convert to json string possibly mentioning used schemas

to_json() str[source]
write_as_json(tileset_path: Path) None[source]

Write the tileset as a JSON file. :param tileset_path: the path where the tileset will be written

write_to_directory(tileset_path: Path, overwrite: bool = False) None[source]

Write (or overwrite), to the directory whose name is provided, the TileSet that is: - the tileset as a json file and - all the tiles content of the Tiles used by the Tileset. :param tileset_path: the target directory name :param overwrite: delete the tileset (and the content) if already exists