intersection = {
const writer = new jsts.io.GeoJSONWriter();
const outLines = [];
lines.features.forEach((line) => {
const lineJsts = geojsonReader.read(line);
if (polyJsts.intersects(lineJsts.geometry)) {
const intersection = polyJsts.intersection(lineJsts.geometry);
outLines.push({
type: "Feature",
properties: line.properties,
geometry: writer.write(intersection)
});
}
});
return geo.featurecollection(outLines);
}