diff --git a/src/renderer/utils/check.js b/src/renderer/utils/check.js index 03833c7..8879e06 100644 --- a/src/renderer/utils/check.js +++ b/src/renderer/utils/check.js @@ -397,6 +397,13 @@ async function checkGroundnet(data) { }); this.postMessage(['progress', 1]); + var doubleEdges = edges.filter((v, i, a) => a.findIndex(t => (t.start === v.start && t.end === v.end) ) !== i); + doubleEdges.forEach(e => { + notOkNodes.push({ id: e.id, message: check_msg.DOUBLE_EDGE }); + }); + + // debugger; + notOkNodes = notOkNodes.concat(invalidParkings); if (invalidParkings.length === 0) { notOkNodes.push({ id: -1, message: check_msg.PARKINGS_VALID }); @@ -517,12 +524,10 @@ var mapRunways = function (o) { var mapEdges = function (o) { if (o.type === 'poly') - // debugger; return { - start: o.start, end: o.end, isPushBackRoute: o.isPushBackRoute !== undefined && + id: o._leaflet_id, start: o.start, end: o.end, isPushBackRoute: o.isPushBackRoute !== undefined && o.isPushBackRoute !== 0, direction: o.direction, latLngs: o.latLngs }; - console.debug(o); } var latToTurf = function (turfPoint) { diff --git a/src/renderer/utils/check_msg.json b/src/renderer/utils/check_msg.json index dc3723a..08367b9 100644 --- a/src/renderer/utils/check_msg.json +++ b/src/renderer/utils/check_msg.json @@ -28,5 +28,6 @@ "TO_MANY_PUSHBACK_TAXI_ROUTES": ["Too many Taxi routes from Pushback Holding Point", ""], "PUSHBACK_EXIT_NOT_BIDRECTIONAL": ["Pushback Holding Point Exit route is not bidirectional", ""], "NO_EDGES": ["No Edges", "No checks are run if there are no edges present"], - "NO_RUNWAYS": ["No Runways", "No checks are run if there are no runways present. APT layer visible?"] + "NO_RUNWAYS": ["No Runways", "No checks are run if there are no runways present. APT layer visible?"], + "DOUBLE_EDGE": ["No Double Edges", "This edge is doubled"] } \ No newline at end of file diff --git a/src/renderer/utils/logger.js b/src/renderer/utils/logger.js index 2fafd4e..8e64a67 100644 --- a/src/renderer/utils/logger.js +++ b/src/renderer/utils/logger.js @@ -14,7 +14,6 @@ d.getMilliseconds() + '.log'; var logStream = null; var loggerInit = function (logging) { - debugger; if (logging) { try { const homedir = require('os').homedir();