-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
759c29e
commit 7ed2d1a
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |