From e1a636df18394d60f808f210235045fbf2533291 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 16 Dec 2022 16:07:39 +0100 Subject: Add adjacent_by_waterway. --- tools/gendata.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools') diff --git a/tools/gendata.js b/tools/gendata.js index ba32d49..e922246 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -306,15 +306,20 @@ function dumplist(name, list) { locales.forEach(loc => { loc.adjacent = [] loc.adjacent_by_trackway = [] + loc.adjacent_by_waterway = [] for (let [to, way] of loc.ways) { if (!loc.adjacent.includes(to)) loc.adjacent.push(to) if (ways[way].type === "trackway") if (!loc.adjacent_by_trackway.includes(to)) loc.adjacent_by_trackway.push(to) + if (ways[way].type === "waterway") + if (!loc.adjacent_by_waterway.includes(to)) + loc.adjacent_by_waterway.push(to) } loc.adjacent.sort(cmpnum) loc.adjacent_by_trackway.sort(cmpnum) + loc.adjacent_by_waterway.sort(cmpnum) }) function seats(list) { -- cgit v1.2.3