diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-12-16 16:07:39 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:38 +0100 |
commit | e1a636df18394d60f808f210235045fbf2533291 (patch) | |
tree | 342f34fd99595445ec5b9f02b054684aa9879432 /tools/gendata.js | |
parent | 32aa0e93fb71d9352ef5866a4ff0c4edf96d3bb1 (diff) | |
download | nevsky-e1a636df18394d60f808f210235045fbf2533291.tar.gz |
Add adjacent_by_waterway.
Diffstat (limited to 'tools/gendata.js')
-rw-r--r-- | tools/gendata.js | 5 |
1 files changed, 5 insertions, 0 deletions
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) { |