Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
transformLineToArcs: (coordinates, options = {npoints: 100, offset: 10, properties: {}}) => {
let arcs = [];
for (let i = 0; i < coordinates.length - 1; ++i) {
const p1 = coordinates[i];
const p2 = coordinates[i + 1];
const start = toPoint(p1);
const end = toPoint(p2);
if (!(p1[0] === p2[0] && p1[1] === p2[1])) {
let grCircle = greatCircle(start, end, options);
arcs = [...arcs, ...grCircle.geometry.coordinates];
}
}
return arcs;
},
transformArcsToLine: (coordinates, npoints = 100) => {