One-way hiking route members (forward/backward roles) kept in their direction by maplibre-gl-lanes; raise Valhalla trace limits for the per-country route summary

This commit is contained in:
randy committed 2026-11-15 10:16:45 +01:00
1 parent 43119cfdae
commit db586c0166
4 files changed
+47 -7

No files matched your search

+14
View File
@@ -24,6 +24,20 @@ class HikingTrailsTest < Minitest::Test
assert_equal "Rysy", feature["properties"]["name"]
end
def test_forward_and_backward_members_are_one_way_and_point_the_way_walked
opl = <<~OPL
w1 Thighway=path Nn10x20.0y49.0,n11x20.1y49.1
w2 Thighway=path Nn11x20.1y49.1,n12x20.2y49.2
w3 Thighway=path Nn13x20.3y49.3,n12x20.2y49.2
r1 Troute=hiking,type=route,name=Loop Mw1@,w2@forward,w3@backward
OPL
feature = Maptool::HikingTrails.parse_opl(opl)["features"].first
assert_equal [1, 2], feature["properties"]["oneway_lines"]
assert_equal [[20.2, 49.2], [20.3, 49.3]], feature["geometry"]["coordinates"][2]
assert_nil Maptool::HikingTrails.parse_opl(opl.sub("forward,w3@backward", ",w3@"))["features"].first["properties"]["oneway_lines"]
end
def test_parse_opl_skips_relations_that_are_not_route_hiking
opl = <<~OPL
w1 Thighway=path Nn10x20.087y49.179,n11x20.088y49.18