Source code for py3dtiles.info

from pathlib import Path

from py3dtiles.tileset.tile_content import TileContent
from py3dtiles.tileset.utils import TileContentReader










[docs] def main(args): try: tile = TileContentReader.read_file(args.file) except ValueError as e: print(f"Error when reading the file {args.file}") raise e magic = tile.header.magic_value if magic == b"pnts": print_pnts_info(tile) elif magic == b"b3dm": print_b3dm_info(tile) else: raise RuntimeError("Unsupported format " + str(magic))
[docs] def init_parser(subparser): # arg parse parser = subparser.add_parser('info', help='Extract information from a 3DTiles file') parser.add_argument('file', type=Path) return parser