Skip to content

Commit 116a5aa

Browse files
committed
add test to verify vpc content
1 parent 8e78f2c commit 116a5aa

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tests/test_classify_ground.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import json
12
import subprocess
23
from pathlib import Path
34

@@ -154,3 +155,30 @@ def test_classify_ground_vpc_with_default_output_format():
154155

155156
assert output_subfolder.exists()
156157
assert all([x.suffixes == [".copc", ".laz"] for x in output_subfolder.iterdir()])
158+
159+
# verify VPC content
160+
vpc_content = json.loads(vpc_copc_laz_output_path.read_text())
161+
162+
# number of files in VPC
163+
assert len(vpc_content["features"]) == 4
164+
165+
# check bbox of first and last file
166+
first_file_bbox = vpc_content["features"][0]["bbox"]
167+
assert first_file_bbox == [
168+
-123.07031171500326,
169+
44.05891131812414,
170+
127.44,
171+
-123.06893735490084,
172+
44.05985282878156,
173+
167.160,
174+
]
175+
176+
last_file_bbox = vpc_content["features"][3]["bbox"]
177+
assert last_file_bbox == [
178+
-123.06893723004889,
179+
44.05792178151518,
180+
126.65,
181+
-123.06756285690368,
182+
44.058912974549095,
183+
160.16,
184+
]

0 commit comments

Comments
 (0)