This commit is contained in:
parent
93a5c954e5
commit
febd720588
@ -31,9 +31,8 @@ export function checkMapper(o) {
|
|||||||
'box': o.box !== undefined ? o.box.getLatLngs() : null
|
'box': o.box !== undefined ? o.box.getLatLngs() : null
|
||||||
};
|
};
|
||||||
} else if (o instanceof L.RunwayNode) {
|
} else if (o instanceof L.RunwayNode) {
|
||||||
console.log(o)
|
console.log(o)
|
||||||
|
return { 'index': Number(o['glueindex']), '_leaflet_id': o._leaflet_id, 'lat': o._latlng.lat, 'lng': o._latlng.lng, 'type': 'runway' };
|
||||||
return { 'index': Number(o['glueindex']), '_leaflet_id': o._leaflet_id, 'lat': o._latlng.lat, 'lng': o._latlng.lng, 'type': 'runway' };
|
|
||||||
} else if (o instanceof L.HoldNode) {
|
} else if (o instanceof L.HoldNode) {
|
||||||
console.log(o)
|
console.log(o)
|
||||||
return { 'index': Number(o['glueindex']), '_leaflet_id': o._leaflet_id, 'type': o.holdPointType };
|
return { 'index': Number(o['glueindex']), '_leaflet_id': o._leaflet_id, 'type': o.holdPointType };
|
||||||
@ -44,7 +43,6 @@ export function checkMapper(o) {
|
|||||||
}
|
}
|
||||||
} else if (o instanceof L.Polyline) {
|
} else if (o instanceof L.Polyline) {
|
||||||
console.log(o)
|
console.log(o)
|
||||||
//_latlngs[""0""].__vertex.glueindex
|
|
||||||
var latLngs = o.getLatLngs().map(l => ({ lat: l.lat, lng: l.lng, index: l.glueindex }));
|
var latLngs = o.getLatLngs().map(l => ({ lat: l.lat, lng: l.lng, index: l.glueindex }));
|
||||||
if (o.options.attributes===undefined) {
|
if (o.options.attributes===undefined) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -190,7 +190,7 @@ You should have received a copy of the GNU General Public License along with FG
|
|||||||
view.scanning = Boolean(workery.checking)
|
view.scanning = Boolean(workery.checking)
|
||||||
workery.view = view
|
workery.view = view
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 500)
|
||||||
},
|
},
|
||||||
test() {
|
test() {
|
||||||
this.$parent.$parent.$refs.editLayer.test()
|
this.$parent.$parent.$refs.editLayer.test()
|
||||||
|
@ -117,7 +117,7 @@
|
|||||||
view.scanning = Boolean(workery.checking)
|
view.scanning = Boolean(workery.checking)
|
||||||
workery.view = view
|
workery.view = view
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 500)
|
||||||
},
|
},
|
||||||
check () {
|
check () {
|
||||||
try {
|
try {
|
||||||
@ -137,15 +137,27 @@
|
|||||||
worker.progress = 0
|
worker.progress = 0
|
||||||
// var worker = new Worker(fileUrl('src/renderer/utils/worker.js'))
|
// var worker = new Worker(fileUrl('src/renderer/utils/worker.js'))
|
||||||
this.worker = worker
|
this.worker = worker
|
||||||
var xml = []
|
var groundnet = []
|
||||||
|
|
||||||
this.$parent.$parent.$parent.$refs.editLayer.groundnetLayerGroup.eachLayer(l => {
|
this.$parent.$parent.$parent.$refs.editLayer.groundnetLayerGroup.eachLayer(l => {
|
||||||
console.log(l)
|
console.log(l)
|
||||||
xml.push(l)
|
if (l instanceof L.Polyline) {
|
||||||
|
l._latlngs[0].glueindex = this.begin;
|
||||||
|
l._latlngs.slice(-1)[0].glueindex = this.end;
|
||||||
|
l.extensions(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
groundnet.push(l)
|
||||||
})
|
})
|
||||||
|
var features = groundnet.map(mapper.checkMapper).filter(n => n)
|
||||||
|
var pavement = []
|
||||||
|
this.$parent.$parent.$parent.$refs.pavementLayer.pavement.eachLayer(l => {
|
||||||
|
console.log(l)
|
||||||
|
pavement.push(l)
|
||||||
|
})
|
||||||
|
var features2 = pavement.map(mapper.checkMapper).filter(n => n)
|
||||||
|
|
||||||
var features = xml.map(mapper.checkMapper).filter(n => n)
|
worker.postMessage(['check', features.concat(features2) ] )
|
||||||
|
|
||||||
worker.postMessage(['check', features ] )
|
|
||||||
this.pollData()
|
this.pollData()
|
||||||
// the reply
|
// the reply
|
||||||
var store = this.$store
|
var store = this.$store
|
||||||
|
@ -33,15 +33,17 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
|
|||||||
this.editLayer = editLayer;
|
this.editLayer = editLayer;
|
||||||
this._latlngs[0].glueindex = this.begin;
|
this._latlngs[0].glueindex = this.begin;
|
||||||
this._latlngs.slice(-1)[0].glueindex = this.end;
|
this._latlngs.slice(-1)[0].glueindex = this.end;
|
||||||
if (typeof this.featureLookup[this.begin] === 'undefined') {
|
if(this.featureLookup) {
|
||||||
this.featureLookup[this.begin] = new Array();
|
if (typeof this.featureLookup[this.begin] === 'undefined') {
|
||||||
|
this.featureLookup[this.begin] = new Array();
|
||||||
|
}
|
||||||
|
if (typeof this.featureLookup[this.end] === 'undefined') {
|
||||||
|
this.featureLookup[this.end] = new Array();
|
||||||
|
}
|
||||||
|
this.featureLookup[this.begin].push(this);
|
||||||
|
this.featureLookup[this.end].push(this);
|
||||||
|
this.bidirectional = true;
|
||||||
}
|
}
|
||||||
if (typeof this.featureLookup[this.end] === 'undefined') {
|
|
||||||
this.featureLookup[this.end] = new Array();
|
|
||||||
}
|
|
||||||
this.featureLookup[this.begin].push(this);
|
|
||||||
this.featureLookup[this.end].push(this);
|
|
||||||
this.bidirectional = true;
|
|
||||||
};
|
};
|
||||||
taxiwaySegment.__proto__.select = function () {
|
taxiwaySegment.__proto__.select = function () {
|
||||||
this.options.attributes.selected = true;
|
this.options.attributes.selected = true;
|
||||||
|
@ -98,11 +98,11 @@ async function checkGroundnet(data) {
|
|||||||
|
|
||||||
console.log(edges);
|
console.log(edges);
|
||||||
if (edges === undefined) {
|
if (edges === undefined) {
|
||||||
resolve({ id: -1, message: check_msg.NO_EDGES });
|
resolve([{ id: -1, message: check_msg.NO_EDGES }]);
|
||||||
}
|
}
|
||||||
this.postMessage(['progress', 1]);
|
this.postMessage(['progress', 1]);
|
||||||
if (runways.length === 0) {
|
if (runways.length === 0) {
|
||||||
resolve({ id: -1, message: check_msg.NO_RUNWAYS });
|
resolve([{ id: -1, message: check_msg.NO_RUNWAYS }]);
|
||||||
}
|
}
|
||||||
this.postMessage(['progress', 1]);
|
this.postMessage(['progress', 1]);
|
||||||
edges.forEach(edge => {
|
edges.forEach(edge => {
|
||||||
@ -380,6 +380,7 @@ async function checkGroundnet(data) {
|
|||||||
|
|
||||||
//Check if nodes no normal nodes are on runway
|
//Check if nodes no normal nodes are on runway
|
||||||
normalNodes.forEach(normalNode => {
|
normalNodes.forEach(normalNode => {
|
||||||
|
//debugger;
|
||||||
if( runways.filter(r => turf.booleanContains(r, latToTurf(normalNode))).length > 0 ) {
|
if( runways.filter(r => turf.booleanContains(r, latToTurf(normalNode))).length > 0 ) {
|
||||||
notOkNodes.push({ id: normalNode.index, message: check_msg.NON_RUNWAYNODE_ON_RUNWAY });
|
notOkNodes.push({ id: normalNode.index, message: check_msg.NON_RUNWAYNODE_ON_RUNWAY });
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user