From f09ee1a22c386d43a6f1c70d5a54a43673542cad Mon Sep 17 00:00:00 2001 From: Mart Clanor Date: Fri, 7 Jun 2024 22:07:53 +0200 Subject: [PATCH] test(gridintersect): clarify intersection of line with grid --- 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)