Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
alavenant committed Mar 27, 2024
1 parent 4c22409 commit 518e9bf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/test_radius_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def distance3d(pt1, pt2):
for i in range(nb_points):
pti_x = pt_x + rand.uniform(-1.5, 1.5)
pti_y = pt_y + rand.uniform(-1.5, 1.5)
pti_z = pt_z + rand.uniform(-1.5, 1.5)
pti_z = round(pt_z + rand.uniform(-1.5, 1.5),2) #pdal only takes 2 numbers precision
pt_i = (pti_x, pti_y, pti_z, 2)

arrays_pti = np.array([pt_i], dtype=dtype)
Expand All @@ -52,9 +52,7 @@ def distance3d(pt1, pt2):

if distance_i_2d < distance_radius:
nb_points_take_2d += 1
if pti_z>pt_z and pti_z-pt_z>0.5:
nb_points_take_2d_above_bellow += 1
if pti_z<pt_z and pt_z-pti_z>0.5:
if abs(pti_z-pt_z)<0.5:
nb_points_take_2d_above_bellow += 1
if distance_i_3d < distance_radius:
nb_points_take_3d += 1
Expand Down

0 comments on commit 518e9bf

Please sign in to comment.