node-red-contrib-tak-registration
Version:
A Node-RED node to register to TAK and to help wrap files as datapackages to send to TAK
13 lines (11 loc) • 438 B
JavaScript
var pointInPolygonFlat = require('./flat.js')
var pointInPolygonNested = require('./nested.js')
module.exports = function pointInPolygon (point, vs, start, end) {
if (vs.length > 0 && Array.isArray(vs[0])) {
return pointInPolygonNested(point, vs, start, end);
} else {
return pointInPolygonFlat(point, vs, start, end);
}
}
module.exports.nested = pointInPolygonNested
module.exports.flat = pointInPolygonFlat