Parse b3dm file content

We can use python with py3dtiles to parse the information in a b3dm file, for example:

from pathlib import Path
from py3dtiles.tileset.content import B3dm, read_binary_tile_content

filename = Path('./test.b3dm')
b3dm = read_binary_tile_content(filename)

b3dm_header = b3dm.header
print(f"\nb3dm_header.magic_value:\n{b3dm_header.magic_value}")
print(f"\nb3dm_header.version:\n{b3dm_header.version}")

print(f"\nImages in b3dm:")
for image in b3dm.body.gltf.images:
    print(image)


Comments

Popular posts from this blog