Source code for py3dtiles.info

from pathlib import Path

from py3dtiles import TileContent, 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 == "pnts": print_pnts_info(tile) elif magic == "b3dm": print_b3dm_info(tile) else: raise RuntimeError("Unsupported format " + 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