From bbc1e89aa965c809458c3dda0691ebf3f4a98d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delabre?= Date: Mon, 13 Jan 2020 18:28:52 +0100 Subject: [PATCH] Treat roundabouts as one-way --- back/data.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/back/data.js b/back/data.js index 3eab080..f7275a5 100644 --- a/back/data.js +++ b/back/data.js @@ -79,8 +79,14 @@ out body qt; for (let id of rawWays) { const {type, nodes, tags} = elements[id]; + + const isOneWay = ( + tags.oneway === 'yes' + || tags.junction === 'roundabout' + ); + const canGoBackward = ( - tags.oneway !== 'yes' + !isOneWay || parseInt(tags['lanes:psv:backward'], 10) > 0 );