25 rdb-example-07-fill-points.py 27 This example shows how to open an existing database and to fill (set) 28 a point attribute with a constant value for all points. Please note 29 that this could also be accomplished by combining select and update 30 queries as shown in "rdb-example-4-update-points.py", but the fill 31 query might be faster (lower processing time) and easier to use. 32 This example is based on the database of rdb-example-1-create-database. 38 with riegl.rdb.rdb_open(
"pointcloud.rdbx")
as rdb:
40 with riegl.rdb.Transaction(
43 "Point Classifier v1.0" 47 with rdb.fill()
as fill:
48 fill.value(rdb.point_attributes[
"riegl.class"], 0)
49 fill.value(rdb.point_attributes[
"riegl.rgba"], (255, 255, 255, 255))
50 while fill.next(10000) > 0:
51 print(f
"{fill.progress()}% done")
56 with rdb.fill(
"riegl.reflectance >= 10")
as fill:
57 fill.value(rdb.point_attributes[
"riegl.class"], 101)
58 fill.value(rdb.point_attributes[
"riegl.rgba"], (255, 102, 0, 255))
59 while fill.next(10000) > 0:
60 print(f
"{fill.progress()}% done")