Skip to content

Commit

Permalink
add test for utils pdal
Browse files Browse the repository at this point in the history
  • Loading branch information
mdupaysign committed Jun 14, 2024
1 parent 574ca49 commit 2f922d4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/pointcloud/test_utils_pdal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import numpy as np

from lidro.create_virtual_point.pointcloud.utils_pdal import (
get_bounds_from_las,
read_las_file,
)

LAS_FILE = "./data/pointcloud/LHD_FXX_0706_6627_PTS_C_LAMB93_IGN69_TEST.las"

# Expected : ([minx,maxx],[miny,maxy])
BoundsExpected_FILE = ([706044.94, 706292.25], [6626159, 6626324])


def test_read_las_file():
pts = read_las_file(LAS_FILE)
assert isinstance(pts, np.ndarray) # type is array


def test_get_bounds_from_las():
bounds = get_bounds_from_las(LAS_FILE)

assert isinstance(bounds, tuple)
assert bounds == BoundsExpected_FILE

0 comments on commit 2f922d4

Please sign in to comment.