function slicePolyByLine(poly, line) {
const polyAsLine = turf.polygonToLine(poly);
const unionedLines = turf.union(polyAsLine, line);
const polygonized = turf.polygonize(unionedLines);
const keepFromPolygonized = polygonized["features"].filter(ea =>
turf.booleanPointInPolygon(turf.pointOnFeature(ea), poly)
);
return keepFromPolygonized;
}