From 1b430bb52186c38dc5efb97a92d220b0b75cf5ac Mon Sep 17 00:00:00 2001 From: martclanor Date: Sat, 8 Jun 2024 04:38:00 +0200 Subject: [PATCH] test(gridintersect): clarify intersection of line with grid (#2216) This PR addresses the following issue: #2214 --- autotest/test_gridintersect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autotest/test_gridintersect.py b/autotest/test_gridintersect.py index dc7a7656f1..43d8237fb1 100644 --- a/autotest/test_gridintersect.py +++ b/autotest/test_gridintersect.py @@ -1214,10 +1214,10 @@ def test_point_offset_rot_structured_grid(): @requires_pkg("shapely") def test_linestring_offset_rot_structured_grid(): sgr = get_rect_grid(angrot=45.0, xyoffset=10.0) - ls = LineString([(5, 10.0 + np.sqrt(200.0)), (15, 10.0 + np.sqrt(200.0))]) + ls = LineString([(5, 25), (15, 25)]) ix = GridIntersect(sgr, method="structured") result = ix.intersect(ls) - assert len(result) == 2 + assert len(result) == 3 # check empty result when using local model coords ix = GridIntersect(sgr, method="structured", local=True) result = ix.intersect(ls)