25 rdb-example-06-database-stat.py 27 This example shows how to open an existing database and output some 28 information about the database like the list of point attributes, 29 number of points and point cloud extents. 35 with riegl.rdb.rdb_open(
"pointcloud.rdbx")
as rdb:
37 for key
in rdb.meta_data:
38 print(
" Name: {0}".format(key))
39 print(
" Value: {0}".format(rdb.meta_data[key]))
46 print(
"POINT ATTRIBUTES:")
47 for attribute
in rdb.point_attributes.values():
48 print(
" Name: {0}".format(attribute.name))
49 print(
" Title: {0}".format(attribute.title))
50 print(
" Description: {0}".format(attribute.description))
51 print(
" Unit: {0}".format(attribute.unit_symbol))
52 print(
" Length: {0}".format(attribute.length))
53 print(
" Resolution: {0}".format(attribute.resolution))
54 print(
" MinimumValue: {0}".format(attribute.minimum_value))
55 print(
" MaximumValue: {0}".format(attribute.maximum_value))
56 print(
" DefaultValue: {0}".format(attribute.default_value))
61 with rdb.stat
as stat:
62 print(
"POINT CLOUD STATISTICS:")
63 print(
" Total point count: {0}".format(stat.point_count_total))
64 print(
" Minimum X, Y, Z: {0}".format(stat.minimum_riegl_xyz))
65 print(
" Maximum X, Y, Z: {0}".format(stat.maximum_riegl_xyz))
70 print(
"PRIMARY INDEX STATISTICS:")
73 leaf.point_count_node,
74 leaf.minimum_riegl_xyz,
75 leaf.maximum_riegl_xyz
77 for leaf
in stat.leaves
79 print(
" Number of leaf nodes: {0}".format(len(leaves)))
80 print(
" Point count, minimum and maximum coordinates for all leaves:")
82 print(
" {0}, {1} - {2}".format(leaf[0], leaf[1], leaf[2]))