Skip to content

Commit

Permalink
add test for smoothing Z
Browse files Browse the repository at this point in the history
  • Loading branch information
mdupaysign committed Jun 11, 2024
1 parent 759c29e commit 7ed2d1a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/vectors/test_smooth_z.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from typing import List

from shapely.geometry import Point

from lidro.create_virtual_point.vectors.smooth_z import smooth_z_by_section


def test_sort_geospatial_points_default():
# Example list of points sorted
points = [
{"geometry": Point(830250.419586801668629, 6291543.20657370518893), "z_q1": 5.15},
{"geometry": Point(830254.099010057398118, 6291523.547940881922841), "z_q1": 2.95},
{"geometry": Point(830257.778433313244022, 6291503.88930805772543), "z_q1": 2.96},
{"geometry": Point(830261.457856569089927, 6291484.230675233528018), "z_q1": 6.00},
{"geometry": Point(830265.137279824819416, 6291464.572042410261929), "z_q1": 6.10},
{"geometry": Point(830268.81670308066532, 6291444.913409586064517), "z_q1": 6.15},
{"geometry": Point(830272.496126336511225, 6291425.254776761867106), "z_q1": 6.10},
{"geometry": Point(830287.621702362317592, 6291346.699770421721041), "z_q1": 7.00},
]

result = smooth_z_by_section(points)

assert isinstance(result, List)
assert result[1]["z_q1"] == 5.15
assert result[2]["z_q1"] == 5.15
assert result[6]["z_q1"] == 6.15

0 comments on commit 7ed2d1a

Please sign in to comment.